I added custom font in my CLI app by configuring it in react-native.config.js Now i want to display Apploading splash screen till my font and other required assets loaded on screen and app is ready to use.
How to display App loading in React native CLI (without expo)
960 Views Asked by Saurabh Jain At
1
There are 1 best solutions below
Related Questions in REACT-NATIVE
- ussd reader in Recket Native module
- I can't make TextInput to auto expand properly in Android
- expo config plugin use import instead of require
- Custom Sound for Expo Push Notifications Only Works in Foreground
- run RTK dispatch on gesture start with React Native
- Should I set Back-End for my React Native application?
- using infoPlist in app.json for expo project seems to not be working
- Anyone have success configuring react-native-home-indicator?
- KeyboardAvoidingView makes a messy the flexbox
- I am getting lots of errors when building react native app in Xcode
- Search and highlight text of current text in PDFKit Swift
- Flatlist Sometimes Capped at 10 Items Bug
- Is there any way to page transition in react native (stack navigation)
- Screen inside Stack.Navigator not visible in React-Native
- React Native stopwatch implementation slow on iOS
Related Questions in REACT-NATIVE-CLI
- React Native Background image doesn't display on actual device
- React Native Crushes when I open Debug on Android Emulator
- "Error: spawn npm ENOENT" in Creating An Expo CLI app
- Error message when running "react-native start"
- React Native iOS build hangs using CLI but works with Xcode
- react native CLI error : REAKeyboardEventObserver.m (in target 'RNReanimated' from project 'Pods')
- I've tried all commands related to the issue I have, & have given Excutable access to gradlew, yet i still keep getting Error: spawn ./gradlew EACCES
- Problem wit react-native-selectable-text package
- I'm encountering an issue in React Native CLI where an error occurs whenever I navigate to the login screen
- Bare expo app vs React native cli app: what is better?
- Error when trying to use react native geolocation in gradle "apparently"
- Is it possible to use React Native CLI for cross platform development?
- How to fixe Cocoapods issues to start a react native project
- Need Help Fetching Current Location/POI/Beacon Using "@situm/react-native" Library
- Can React Native Track-Player play url without .mp3 extension?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Adding Fonts
If you are using
react-native-cliyou dont need to useAppLoadingcomponent to add your fonts, you just have to follow these simple steps for React Native Version > 0.60:STEP 1: Add Fonts to Assets
Add the fonts you want to use to your project in
src/assets/fontsfor example.STEP 2: Define assets directory (Which you already did i guess)
Create file react-native.config.js in your root project directory and add following code
STEP 3: Link assets using react-native link
Run in terminal in your root project directory
NOTE:
link command will link fonts in
Info.plstfor IOS, and creates fonts directoryandroid/app/src/main/assets/fontsfor Android, where copies of your custom fonts will be stored.Splash screen
You can simply achieve that by configuring your root navigator e.g.
StackNavigatorto show a normal screen component that returns some sort of a loading indicator as the first screen to be rendered when your app first starts.Then in that component, use
useEffectto do some background tasks that need to be done before your app starts.Finally, when the awaited tasks are done, simply navigate to your main app flow e.g.
HomeScreen.jsusing thenavigation.navigate()method.