shubhnik / redux-react-navigation-demos

React-Native + Redux + Redux-Persist + React Navigation ( Authentication Flow with Redux demos)
152 stars 55 forks source link

Support for Register screen #2

Open ahetawal-p opened 6 years ago

ahetawal-p commented 6 years ago

Hey @shubhnik Just wanted to share the diff of what I am trying to build on top of the nestedTab branch. I will move this to separate branch, once we decide on how to go about to support this scenario.

So basically trying to add a Register button on the login screen, which will navigate to the screen in the StackNavigator. But for that to work, seems i need to define it as an action and state as well. And have another redux state to handle the register action.

So I am thinking if thats the route we go with, I would then need to define all these actions and state before hand for : login register password forget . Is that how this will work ?

shubhnik commented 6 years ago

for loggedOut state you most probably need an initial state corresponding to the stackNavigator(containing login and signup) and for LoggedIn state you will need an initialState for TabNavigator. For register action you have to push the state for TabNavigator.