nested route updates #780
Answered
by
developit
TreetopFlyer
asked this question in
Q&A
-
Enjoying WMR, I had a question about nested routes. I'm probably not understanding something about router setup/route changes but here goes: If you:
|
Beta Was this translation helpful? Give feedback.
Answered by
developit
Jul 27, 2021
Replies: 1 comment 1 reply
-
Yeah, this one is tricky, and currently it's "working as designed". We need to fully replace routes when navigating in order to allow for the routes to potentially suspend - and we can't really know in advance whether they will or won't do so. IIRC most of the other routers work this way, preact-router was sortof on its own. I don't know what the right answer is though, ideally we would provide a way to configure if you want shared routes to remount or simply update. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
TreetopFlyer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah, this one is tricky, and currently it's "working as designed". We need to fully replace routes when navigating in order to allow for the routes to potentially suspend - and we can't really know in advance whether they will or won't do so.
IIRC most of the other routers work this way, preact-router was sortof on its own. I don't know what the right answer is though, ideally we would provide a way to configure if you want shared routes to remount or simply update.