Replies: 2 comments 6 replies
-
I wonder if these router properties are a reason to add jotai as a dependency of waku. Or maybe a separate jotai-waku-router package to implement it. It feels like a good use for atoms. I see next/navigation moved the router properties to individual functions like usePathname. I wonder why. Maybe it was to force more granularity so devs avoid re-renders. Maybe react compiler avoid needing to think about that. |
Beta Was this translation helpful? Give feedback.
-
I use useTransition for such cases, but is it different from your requirement? |
Beta Was this translation helpful? Give feedback.
-
With React 19 streaming and Suspense, we can get very fast time-to-first-byte for dynamic pages. But sometimes, there are factors like poor network conditions that might introduce time between when someone clicks a link and receives the server response.
It would be great to have something like SvelteKit's
navigating
object in the router properties when the "change router" process has started but it is waiting for the server to start streamining.https://svelte.dev/docs/kit/$app-state#navigating
React Router also has something similar
https://api.reactrouter.com/v7/functions/react_router.useNavigation.html
https://api.reactrouter.com/v7/types/react_router.NavigationStates.html
Beta Was this translation helpful? Give feedback.
All reactions