Skip to content

Instantly share code, notes, and snippets.

@anosikeosifo
Created January 21, 2018 16:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anosikeosifo/f0df960c177dfb57c4f7ed5e4557704c to your computer and use it in GitHub Desktop.
Save anosikeosifo/f0df960c177dfb57c4f7ed5e4557704c to your computer and use it in GitHub Desktop.
let initialState = {
index: 0,
routes: [
{
key: "initialLogin",
routeName: <initial_screen_name>
}
]
};
const navigationReducer = (state, action) => {
const nextState = ApplicationNavigator.router.getStateForAction(
action,
state
);
return nextState || state;
};
export default navigationReducer;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment