Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
react-native-animated-splash-screen
Advanced tools
Animated splash screen component for React Native project.
Animated splash screen for Android and iOS. It is based on Implementing Twitter’s App Loading Animation in React Native topic from RN. To work on Android, it use an Image instead of MaskedView.
yarn add react-native-animated-splash-screen
or
npm install --save react-native-animated-splash-screen
import AnimatedSplash from "react-native-animated-splash-screen";
render() {
return (
<AnimatedSplash
isLoaded={this.state.isLoaded}
logoImage={require("./assets/logo.png")}
backgroundColor={"#262626"}
logoHeight={150}
logoWidht={150}
>
<App />
</AnimatedSplash>
);
}
Name | Description | Type | Required | Default Value |
---|---|---|---|---|
isLoaded | Condition to show children component and finish the animation. | Boolean | ✓ | |
backgroundColor | Splash screen background color. | String | '#f00' | |
logoImage | Splash screen logo image. | Object | ✓ | |
logoWidth | Logo image width in px . | Number | 150 | |
logoHeight | Logo image height in px . | Number | 150 | |
children | Children to render inside this component. | Node | null | |
preload | Condition to load children component while wait isLoaded prop be True. | Boolean | true |
const AppNavigator = createStackNavigator(
{
home: {
screen: HomeScreen,
navigationOptions: {
header: null
}
},
dashboard: {
screen: DashboardScreen,
navigationOptions: {
title: "Dashboard"
}
}
},
{
initialRouteName: "home"
}
);
const Container = createAppContainer(AppNavigator);
class App extends React.Component {
state = {
isLoaded: false
};
async componentDidMount() {
await loadAsync();
this.setState({ isLoaded: true });
}
render() {
return (
<AnimatedSplash
isLoaded={this.state.isLoaded}
logoImage={require("./assets/logo.png")}
backgroundColor={"#262626"}
logoHeight={150}
logoWidht={150}
>
<Container />
</AnimatedSplash>
);
}
}
export default App;
class App extends React.Component {
state = {
isLoaded: false
};
setAppLoaded = () => {
this.setState({ isLoaded: true });
};
render() {
return (
<AnimatedSplash
isLoaded={this.state.isLoaded}
logoImage={require("./assets/logo.png")}
backgroundColor={"#262626"}
logoHeight={150}
logoWidht={150}
>
<Container screenProps={{ setAppLoaded: this.setAppLoaded }} />
</AnimatedSplash>
);
}
}
export default App;
const AppNavigator = createSwitchNavigator(
{
home: {
screen: props => (
<HomeScreen {...props} setAppLoaded={props.screenProps.setAppLoaded} />
)
},
dashboard: { screen: DashboardScreen }
},
{
initialRouteName: "home"
}
);
this.props.setAppLoaded();
MIT
FAQs
Animated splash screen component for React Native project.
The npm package react-native-animated-splash-screen receives a total of 419 weekly downloads. As such, react-native-animated-splash-screen popularity was classified as not popular.
We found that react-native-animated-splash-screen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.