Skip to content

Updating parameters from screen B to Screen A #11654

Closed Answered by satya164
RafaelCENG asked this question in Q&A
Discussion options

You must be logged in to vote
const state = navigation.getState();
const route = state.routes.find(r => r.name === 'CustomPositionsView');

navigation.dispatch({
  ...CommonActions.setParams({
    preSelectedBike: props.route.params.selectedBike.id,
    saved: true,
  }),
  source: route.key,
});

https://reactnavigation.org/docs/navigation-actions/#setparams

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@RafaelCENG
Comment options

Answer selected by RafaelCENG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants