useLocationAtom not retriggering derived atoms on previously visited urls. #3028
-
Hello, I am currently doing this:
Which works fine until I go to a url that I've already visited. For my example, the fileId is stored in the pathname and when I switch files then come back to a previously visited file the selectedFileIdAtom still contains the previously visited fileId even though the URL contains the new fileId. Am I doing something wrong here or is there a way I could fix this issue? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@Flirre ? |
Beta Was this translation helpful? Give feedback.
-
After looking into this more, it seems it has to do with my apps routing functions and not handling it correctly which somehow causes the popstate event not to trigger when visiting an already visited page. |
Beta Was this translation helpful? Give feedback.
After looking into this more, it seems it has to do with my apps routing functions and not handling it correctly which somehow causes the popstate event not to trigger when visiting an already visited page.