Post

Did you return `queryRef` or `queryRef.toPromise()` from the loader? Doing the latter might help.

0 reposts1 like

bottom line is that transitions around navigate "work", but are short-circuited by useSyncExternalStore used by the router :/. It's a trade-off. FWIW, useDeferredValue on the QueryKey is what works for react-query.

The router uses useSyncExternalStore for it's state, and every time an update is received, that de-opts from concurrent features to avoid tearing. It's a trade-off between being fully concurrent compatible and having fine-grained subscriptions to router state. Can't have both right now.

Thanks for the input @tkdodo.eu 👍 We already have a custom version of `useSuspenseQuery` that handles the re-suspension issue but @phry.dev is it possible to do something similar with `useReadQuery`? Or what would be the best pattern to use Suspense with loaders that are driven by url params?