bukunmikuti
Please help with some route ideas
I have struggled with this for a while and I need ideas to make this work 🙏
My app has 4 onboarding screens using a single URL but each screen accessed through a unique param. The path for the onboarding screen is like /get-started?stage=[stage], where 'stage' is the unique name for each stage of the onboarding process. I used this method to make users able to use the back button to see previous screen, since each stage is simply a component (dynamic component, with computed
:is
prop).
When user eventually signup at the last stage, I want to simply replace the '/get-started' with '/app'. The challenge is that each param is a unique entry in the history stack and I would need to replace the 4 previous 'get-started' path instead. I tried the following but it doesn't work.
I simple want all the 'get-started' path to be replaced with /app, such that when the user use the back button immediately after onboarding it will go to the previous screen before the entire /get-started?stage=[stage] paths.
Please advise the best way to do this or similar ideas I should use instead. Thank you so much for your time!
Note: I have implemented a middleware that redirects user to app if the session is authenticated. This works well. My question is simply when the user moves from 'get-started' to 'app' without a full browser reload.1 replies