Open seivan opened 4 years ago
Thanks for the bug report! I took a look and was able to reproduce. I'll give this a closer look tomorrow.
I was only able to reproduce this in codesandbox, not 100% why yet. Did you run into this anywhere else?
No, I was evaluating it using sandbox, but I guess that's not fair. I'll close this for now, but I suspect you're right and it's isolated to there.
Could be related to HRM.
I'm going to reopen this and update the title to make it specific to codesandbox since it'd be nice if that worked. Might not be able to do anything from this end but I'd still like to look into it more.
Hi @bradenhs not sure if it is the same issue of something not related at all but I would expect to be able to navigate back. Currently this is what I am having:
Thanks for sharing the screen recording @garronej! If I'm understanding correctly there could be an issue here depending on what the route was before the screen recording started.
We start at /funcamp
and then replace /funcamp
with /funcamp/home
and then the back button is clicked. Since replace
was used and not push
its as if the initial /funcamp
route was never in the browser's history at all. The /funcamp/home
route now has taken its place. So when the back button is clicked we are going to go back to what was before the initial /funcamp
route. If that happened to be /funcamp/home
then the behavior we're seeing here would seem to be correct. Could you do a little more investigation on your end to verify if that's the case or not? I'd love to get to the bottom of this if there is a problem here.
@bradenhs you're right of course there is nothing wrong with the lib. RTFM for me. :octocat:
Thank you for the explanation. I am talking a lot about your lib around me btw.
Cheer
First of thank you for such an amazing library. It has a neat and tidy public interface, it's nice to see a routing lib implemented so well in Typescript. Really happy over how small the API surface is.
There seems to be a bug where you can't go "back" after selecting a route the first time. I think when the previous "action" was an "initial", the back button remains disabled.
It works after you click on a second route, but the first routing action should allow you to go back.
Sandbox