I am using
Navigation between pages is not smooth.It takes more than 4 seconds to go to other page.
I am working on Android with Geny Motion. I turned off Dev Mode and disabled live reload,Hot reloading.
My App has lot of static images(so far around 10+). It will get bigger.Kindly assist what need to be done. So that it will be a smooth navigation.
You should try rendering a placeholder while the animation is in progress, this is mentioned in the core RN docs. See if this helps:
constructor() {
super();
this.state = {
renderPlaceholderOnly: true,
};
}
componentDidMount() {
InteractionManager.runAfterInteractions(() => {
this.setState({
renderPlaceholderOnly: false,
});
});
}
render() {
if (this.staterenderPlaceholderOnly) {
return null; // render some non-heavy component
}
// render images here
}
I don't get it right now what u said. But after reducing the dimension of images and reducing the size of images to few KB navigation is smooth now. Few of my image was in few MB and higher dimensions.
I will look into what u said since I just now started to explore React Native
Yeah you're images should not be MB, they should be <200kb if you can help it.
Check out: https://facebook.github.io/react-native/docs/performance.html#slow-navigator-transitions
relate to this topic #1717 let us talk about it.
This should make it to wiki/docs
Most helpful comment
You should try rendering a placeholder while the animation is in progress, this is mentioned in the core RN docs. See if this helps: