react-native app container to support splash screen functionallity
First add package:
npm install react-native-splashed-app --save
In your App.js
import SplashApp from 'react-native-splashed-app'
// more code
<SplashedApp imageSource={require('./App/Images/splash.jpg')} direction="up" duration="2000" withFadeOut>
<App></App>
</SplashedApp>
If you use redux
<Provider store={store}>
<SplashedApp imageSource={require('./App/Images/splash.jpg')} direction="up" duration="2000" withFadeOut>
<App></App>
</SplashedApp>
</Provider>
parameter | type | optional(default) |
---|---|---|
imageSource | require('image/file/path') | if text supplied |
text | string | yes |
baseColor | string | yes |
direction | string | yes (up) |
duration | number | yes (3000) |
withFadeOut | bool | yes (false) |