React-router: Feature Suggestion

Created on 20 Mar 2018  路  1Comment  路  Source: ReactTraining/react-router

I would like to suggest a feature for React Router Native, there are cases where on one will want to reset the current route stack and navigate to a new router as the base.

Scenerio

A user launches the mobile app, goes to the login form and enters his login details, after the person has been authenticated, he gets redirected to the home scene, from there, even when the user clicks on the back button the routes do not navigate back to the login form.

I hope I get listened to, I haven't giving it a shot at developing anything for React Native so far, so I don't really know how to go about doing that, If I did would have implemented and done a PR, but all the same I hope I get listened to, and thanks for your efforts so far to the open source community, been using React Router from day one.

Most helpful comment

You can do this by forcing React to re-create the NativeRouter instance with a key prop:

<NativeRouter key={currentUser.id} />

>All comments

You can do this by forcing React to re-create the NativeRouter instance with a key prop:

<NativeRouter key={currentUser.id} />
Was this page helpful?
0 / 5 - 0 ratings