forked from calebnance/expo-netflix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
upgraded to latest react navigation v6, removed registerRootComponent…
…() usage, and converted App.js to function component
- Loading branch information
1 parent
92ed627
commit cdda318
Showing
4 changed files
with
2,122 additions
and
3,056 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import * as React from 'react'; | ||
import { StatusBar } from 'react-native'; | ||
import AppLoading from 'expo-app-loading'; | ||
import { func } from './src/constants'; | ||
|
||
// main navigation stack | ||
import RootStack from './src/navigation/RootStack'; | ||
|
||
const App = () => { | ||
const [isLoading, setIsLoading] = React.useState(true); | ||
|
||
// pre-loading assets/fonts? | ||
if (isLoading) { | ||
return ( | ||
<AppLoading | ||
onError={() => { | ||
// console.warn | ||
}} | ||
onFinish={() => setIsLoading(false)} | ||
startAsync={func.loadAssetsAsync} | ||
/> | ||
); | ||
} | ||
|
||
return ( | ||
<React.Fragment> | ||
<StatusBar barStyle="light-content" /> | ||
|
||
<RootStack /> | ||
</React.Fragment> | ||
); | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.