You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off, love rnrf it's great. Routes are still a fairly new concept to me so it could be something wrong in my implementation of solving the problem.
What I'm trying to achieve is from the Login Page have some logic to determine what the User's first page is after login. For instance the user can set a favourite device and from Login navigate straight to this page, if the user doesn't have a favourite set, it should go to the default Home Page.
After this though, from the Users Favourite Device Page they should be able to pop to the default home page.
Login Page -> User's Favourite Device Screen (if exists) OR -> Home Page (no favourites set)
Then from:
Users Favourite Device Screen -> Pop() -> Home Page
So effectively I'm trying to add the Home Page to the stack (or Route?) and then add the Device Screen as well, so I can pop back.
Version
react-native-router-flux v4.0.0-beta.22
react-native v0.49.1,
Expected behaviour
To add to the stack (Or Route) without actually navigating to the page
Actual behaviour
The only way I can think of doing it is to load the first page initially then quickly load the next. The screen flickers and isn't a very elegant solution.
The text was updated successfully, but these errors were encountered:
(don't forget to remove the listener in WillUnmount)
And then, if you're using a back button on your screen, override your code and implement something like the Android code, meaning that instead of pop your scene, you replace it with your home scene
Thanks for your ideas, I ended up creating a flag that is set if the homePage is loaded to the stack or not. Then created a backhandler like:
if(this.props.homePageLoaded){//else we can pop to itActions.pop();}else{//if home page is not loaded in the stack we need to navigate to itActions.Home();}returntrue;}
Then on the ComponentWillMount on the Home page I set the homePageLoaded to true. Otherwise it's default is false.
First off, love rnrf it's great. Routes are still a fairly new concept to me so it could be something wrong in my implementation of solving the problem.
What I'm trying to achieve is from the Login Page have some logic to determine what the User's first page is after login. For instance the user can set a favourite device and from Login navigate straight to this page, if the user doesn't have a favourite set, it should go to the default Home Page.
After this though, from the Users Favourite Device Page they should be able to pop to the default home page.
Login Page -> User's Favourite Device Screen (if exists) OR -> Home Page (no favourites set)
Then from:
Users Favourite Device Screen -> Pop() -> Home Page
So effectively I'm trying to add the Home Page to the stack (or Route?) and then add the Device Screen as well, so I can pop back.
Version
Expected behaviour
To add to the stack (Or Route) without actually navigating to the page
Actual behaviour
The only way I can think of doing it is to load the first page initially then quickly load the next. The screen flickers and isn't a very elegant solution.
The text was updated successfully, but these errors were encountered: