-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
Version
- react-native-router-flux v3.2.8
- react-native v0.22.2
Expected behaviour
Go from a SplashScreen page to the Home page without setState warnings
Actual behaviour
It reset's the stack but also generates the warning 3 times.
If I go to the Home page without using reset (so a normal push is done), it works well.
<Router>
<Scene key="root">
<Scene key="splashscreen" component={Splashscreen} initial={true} hideNavBar={true}/>
<Scene key="home" component={Home}/>
</Scene>
</Router>
- Create the splashscreen component with the following code:
export default class Splashscreen extends Component {
componentDidMount(){
Actions.home({type: "reset"});
}
render() {
return (
<View></View>
);
}
}
- Create a home component with dummy render.
Extra info
- If the Splashscreen code uses a
setTimeoutfunction for callingActions.home({type: "reset"});, then it works fine. - This happens to me while developing a react-native app with Parse server (running on localhost) once checking for an existing logged user on startup.
Metadata
Metadata
Assignees
Labels
No labels
