Created
July 5, 2019 13:22
-
-
Save FreddyPoly/3b9dbbe032c9eea126750435d422f27d to your computer and use it in GitHub Desktop.
[REACT NATIVE] Splash App
This file contains hidden or 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
import "./i18n" | |
import * as React from "react" | |
import { AppRegistry } from "react-native" | |
import { StatefulNavigator } from "./navigation" | |
import { StorybookUIRoot } from "../storybook" | |
import { RootStore, setupRootStore } from "./models/root-store" | |
import { Provider } from "mobx-react" | |
import { BackButtonHandler } from "./navigation/back-button-handler" | |
import { contains } from "ramda" | |
import { DEFAULT_NAVIGATION_CONFIG } from "./navigation/navigation-config" | |
// ***** ICI ***** | |
import SplashScreen from "react-native-splash-screen" | |
interface AppState { | |
rootStore?: RootStore | |
} | |
export class App extends React.Component<{}, AppState> { | |
async componentDidMount() { | |
// ***** ET LA ***** | |
SplashScreen.hide() | |
this.setState({ | |
rootStore: await setupRootStore(), | |
}) | |
} | |
... | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment