You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using connected-react-router in our app and found ourselves in need of an actual history stack saved in the store that would (beside other potential usages) allow us to pass a flag to the history push / replace method in order to skip back a specific number of screens (i.e. we have a "project create" flow that includes 4 different steps; after we finish the last step we do not want the user to reach back to it when clicking on the browser "back" button, he has to start over from step 1).
This could have been implemented locally, by using session storage or something similar and checking the flag when reaching back the last step of the flow, but we wanted a generic way of doing this, as simple as possible, therefore all we need to do right now is to use history.push('url', { skipBack: 4 }) when redirecting away from the last step and the middleware will handle everything when the user tries to go back.
I am wondering if it would be of interest to somehow merge this functionality into this repo so that users can opt-in. I have found a similar package that also uses connected-react-router but it felt a bit too lightweight. For instance, it does not tell us if the last action was 'BACK' or 'FORWARD', it also does not have the skip back/forward functionality implemented and it breaks on page refresh (we are saving the router state in session storage on app unload in order to be able to get it back in case of page reload / manual url change).
I can give you more details if this feels of interest to you, please reach back. I could also make a separate package for this, but felt like I should talk to you first. Also, I'm not sure if I posted this in the right place but I didn't know how to contact you.
Have a nice day!
The text was updated successfully, but these errors were encountered:
Hi,
We are using
connected-react-router
in our app and found ourselves in need of an actual history stack saved in the store that would (beside other potential usages) allow us to pass a flag to the historypush
/replace
method in order to skip back a specific number of screens (i.e. we have a "project create" flow that includes 4 different steps; after we finish the last step we do not want the user to reach back to it when clicking on the browser "back" button, he has to start over from step 1).This could have been implemented locally, by using session storage or something similar and checking the flag when reaching back the last step of the flow, but we wanted a generic way of doing this, as simple as possible, therefore all we need to do right now is to use
history.push('url', { skipBack: 4 })
when redirecting away from the last step and the middleware will handle everything when the user tries to go back.I am wondering if it would be of interest to somehow merge this functionality into this repo so that users can opt-in. I have found a similar package that also uses
connected-react-router
but it felt a bit too lightweight. For instance, it does not tell us if the last action was 'BACK' or 'FORWARD', it also does not have the skip back/forward functionality implemented and it breaks on page refresh (we are saving the router state in session storage on app unload in order to be able to get it back in case of page reload / manual url change).I can give you more details if this feels of interest to you, please reach back. I could also make a separate package for this, but felt like I should talk to you first. Also, I'm not sure if I posted this in the right place but I didn't know how to contact you.
Have a nice day!
The text was updated successfully, but these errors were encountered: