#Awaiting loader data
1 messages · Page 1 of 1 (latest)
I think this is going to be a thing you can do once deferred loaders are a thing
At the moment, I'm not sure it's possible with loaders but someone pls correct me if I'm wrong
Yeah this is what I feared. This makes me want to stick to React Query and build an /api endpoint for data reads & mutations. But I worry this is going to defeat the purpose of using Remix.
You could try and do it in such a way where you can almost drop in deferred loaders once they're available?
Idk how much effort that would take; I've never used a fancy query library before
You can use the useTransition route to know if a navigation is pending, then in the current route change the UI with a skeleton UI
Oh I like that idea. Thanks
is it possible to get the route you're transitioning to? Im mainly getting the searchparams, so i could optimistically load the searchparams, or am i doing this wrong?
You can use transition.location to know where you’re navigating to
thanks!
Here’s what the hook returns https://remix.run/docs/en/v1/api/remix#usetransition