useBeforeLeave or similar for tracking route change in Start
I need to track route changes within Start. Solid Router comes with useBeforeLeave which I can use to track the page the user is moving to however Start doesn't export it. Is everyone else importing router directly in this case?
10 Replies
I think you can import it directly.
useBeforeLeave
not being exported by Start seems to be of hindsight given that iirc it is a new featurehmmm, maybe I should put in a PR to export it from start directly
wait that's a thing? I was using
GitHub
GitHub - solidjs/solid-router: A universal router for Solid inspire...
A universal router for Solid inspired by Ember and React Router - GitHub - solidjs/solid-router: A universal router for Solid inspired by Ember and React Router
Lots of goodies there. Start uses it under the hood it just doesn't expose some of the primitives
Thanks
routing triggers suspense?
to show a loader for fallback
I don't believe routing triggers suspense on its own, a promise or resource would though.
Is there a way to show a fallback while routing is taking place?
Have a look at
useIsRouting()
with a Show
Thanks