react-navigation / rfcs

RFCs for changes to React Navigation
Other
88 stars 16 forks source link

Action property that indicates to routes that they should not change index #66

Closed brentvatne closed 4 years ago

brentvatne commented 5 years ago

COMPLETE_TRANSITION and SET_PARAMS are examples of actions that should not change the focused index for any router if they are applied to a child route.

https://github.com/react-navigation/react-navigation-core/blob/master/src/routers/StackRouter.js#L574-L583

The problem is that navigators can define their own actions that need to behave the same. For example, drawer actions (except maybe open drawer, unsure about that) need this behavior (or this happens: https://github.com/react-navigation/react-navigation/issues/5183) because they can fire on a child route when the parent stack (or whichever navigator) is navigating to another screen.

satya164 commented 4 years ago

Closing since we have such a property now.