Skip to content

Instantly share code, notes, and snippets.

@Ribeiro-Tiago
Created February 4, 2019 15:40
Show Gist options
  • Save Ribeiro-Tiago/cd9270615c030db2b9a246ea28aa0e22 to your computer and use it in GitHub Desktop.
Save Ribeiro-Tiago/cd9270615c030db2b9a246ea28aa0e22 to your computer and use it in GitHub Desktop.
const prevGetStateForAction = myStack.router.getStateForAction;
myStack.router.getStateForAction = (action , state) => {
if (state && action.type === "Navigation/NAVIGATE") {
// do stuff
}
return prevGetStateForAction(action, state);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment