-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Browser back button? #79
Comments
I would love to see this as well. |
Also interested, what is the best way to go about doing this? |
Sorry for the delay - great idea, this feature should be mandatory and I’ll look into to after I get this library to work with hooks |
@newbreedofgeek I can help here if you need. |
Hi @zeel - thanks! Yes, your help is appreciated. Let’s do some solution design first between us: How I would do it:
Step 2 deep link: ... Step 9 deep link: Should be easy to do this by adding an hash. This is so the user can share a deep link to a step if needed.
PushState has 3 params : We can use data to store the step index based on the URL # we used. Title can be ignored I think and url will be the hash based URL Eg So: This should take care of the user going back and front on the webpage and the history will keep up.
window.addEventListener('popstate', function(e) { There is a good example here: Let me know your thoughts? Or give it a go and let me know if it works? Thanks! |
@newbreedofgeek seems feasible with your approach. maybe whole feature can be added behind one prop so if someone don't want this feature, it won't pollute browser history. I will try this from master branch and update here. Hope it won't conflict with React hooks development |
Nice component - thanks for putting it out! I tried the live demo and it seems that the browser 'back' button does not move backward in the form, which is something I need in my app - so - how hard is it to make it do that?
The text was updated successfully, but these errors were encountered: