Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear history stack without route change? #2127

Closed
gmverdon opened this issue Jul 27, 2017 · 2 comments
Closed

Clear history stack without route change? #2127

gmverdon opened this issue Jul 27, 2017 · 2 comments

Comments

@gmverdon
Copy link

  • react-native-router-flux v4.0.0

Is it possible clear the history stack and eliminate the navbar back button, without doing a route change.

Example:

When I open the app I am on the initial screen. I push a new screen on top of the initial screen. The new screen has a button which says 'Clear history stack'. When I click on the button I want to stay on the same page (so no route switch), but clear the history stack so it is not possible to go back to the previous screen (the initial screen).

Thanks in advance.

@aksonov
Copy link
Owner

aksonov commented Jul 27, 2017

Try Actions.ROUTE_NAME({type: 'replace'}) where ROUTE_NAME is name of current route.

@aksonov
Copy link
Owner

aksonov commented Jul 29, 2017

Closed because of inactivity.

@aksonov aksonov closed this as completed Jul 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants