What is the difference between using navigation.navigate()
and navigation.dispatch(CommonAction.navigate())
in React Native?
CodePudding user response:
The docs explanation is:
The dispatch method lets us send a navigation action object which determines how the navigation state will be updated. All of the navigation functions like navigate use dispatch behind the scenes.
https://reactnavigation.org/docs/navigation-prop/#dispatch
AFAIK there is no real difference between using actions and navigate