- First Run
- Change Splash Screen Logo
- Vector Icon
- Version Bump
- Absolute Aliased Import
- Global State Management
- Navigation
- Deep Link
- Components
- Troubleshooting
This was bootstrapped with TS-Redux Template
Remember to install Pods if you are developing for ios (On MacOS)
cd ios && pod install && cd ..
Replace src/assets/images/bootsplash_logo.png
with your own then run,
yarn regenerate-bootsplash
For more control, see React Native Bootsplash - Setup - Assets Generation
By default, to reduce footprint, only MaterialCommunityIcon
is enabled. You can easily enable other icons by following the instruction below.
Edit ios/HelloWorld/Info.plist
and add a property called UIAppFonts
and add your desired fonts from the list below.
<key>UIAppFonts</key>
<array>
<string>AntDesign.ttf</string>
<string>Entypo.ttf</string>
<string>EvilIcons.ttf</string>
<string>Feather.ttf</string>
<string>FontAwesome.ttf</string>
<string>FontAwesome5_Brands.ttf</string>
<string>FontAwesome5_Regular.ttf</string>
<string>FontAwesome5_Solid.ttf</string>
<string>Foundation.ttf</string>
<string>Ionicons.ttf</string>
<string>MaterialIcons.ttf</string>
<string>MaterialCommunityIcons.ttf</string>
<string>SimpleLineIcons.ttf</string>
<string>Octicons.ttf</string>
<string>Zocial.ttf</string>
<string>Fontisto.ttf</string>
</array>
Then Rebuild The App.
Edit android/app/build.gradle
and find:
project.ext.vectoricons = [
iconFontNames: [ 'MaterialCommunityIcons.ttf' ]
]
Now add your desired fonts inside the iconFontNames
array.
iconFontNames: [
'AntDesign.ttf',
'Entypo.ttf',
'EvilIcons.ttf',
'Feather.ttf',
'FontAwesome.ttf',
'FontAwesome5_Brands.ttf',
'FontAwesome5_Regular.ttf',
'FontAwesome5_Solid.ttf',
'Foundation.ttf',
'Ionicons.ttf',
'MaterialIcons.ttf',
'MaterialCommunityIcons.ttf',
'SimpleLineIcons.ttf',
'Octicons.ttf',
'Zocial.ttf',
'Fontisto.ttf'
]
Then rebuild the app.
This template comes with react-native-version. Just do,
yarn version
to bump version number on both ios and android.
You can import any files inside src/
directory using ~/
prefix.
// src/stores/store/storeHook.ts
import { useAppSelector } from '~/stores/store/storeHooks';
// src/components/custom-drawer.tsx
const CoolestImage = () => (
<Avatar.Image
source={require('~/assets/bootsplash_logo.png')}
/>
);
The Excellent redux is preconfigured with [@react-native-community/async-storage] (https://github.com/react-native-community/react-native-async-storage) persistence using redux-persist.
You can access the store using useAppSelector
hook that's exported from storeHooks.ts
.
You can view the pre-configured Root Store Model and customize it in store.ts
.
React Navigation is pre-configured with the Root Stack Being a Native Stack.
- Native Stack Navigator
- Drawer Navigator (With Custom Drawer Component using React Native Paper)
- Material Top Tab Navigator
- Material Bottom Tab Navigator
The aforementioned navigators are nested in the following way:
Root Stack Navigator (navigators/root-stack.tsx)
|-- Loader Screen (screens/loader.tsx)
|-- Drawer Navigator (navigators/drawer.tsx)
| |-- Welcome Screen (screens/welcome.tsx)
| |-- Top Tab Navigator (navigators/top-tab.tsx)
| | |-- Screen One (screens/one.tsx)
| | |-- Screen Two (screens/two.tsx)
| | |-- Screen Three (screens/three.tsx)
| |-- Bottom Tab Navigator (navigators/bottom-tab.tsx)
| | |-- Home Screen (screens/home.tsx)
| | |-- Details Screen (screens/details.tsx)
Deep Link & Universal Link is also pre-configured for React Navigation. It should just work
on android. Universal Link for IOS may need additional setup.
URL: https://www.helloworld.com
Schema: helloworld://
You can use uri-scheme
to test deep links on both ios and android.
npx uri-scheme open helloworld://loader/3000/Test_Deep_Link --android
npx uri-scheme open helloworld://loader/3000/Test_Deep_Link --ios
px uri-scheme open https://www.helloworld.com/loader/3000/Test_Deep_Link --android
npx uri-scheme open https://www.helloworld.com/loader/3000/Test_Deep_Link --ios
See React Navigation - Deep linking & React Navigation - Configuring links for more information.
A scrollable container that respects safe area and accepts both SafeAreaView and ScrollView props.
For non scrollable pages, respects safe area and accepts SafeAreaView props.
Same as Container, but plays nicely with keyboard. Useful for screens with forms.
See Here for a list of potential issues and their solutions.