#Awaiting loader data

1 messages · Page 1 of 1 (latest)

reef ermine
#

I want to load a UI Skeleton when a user clicks on a page & populate the skeleton once data from the loader has returned requests to a database.

Currently the page transition freezes until the loader gets the data and the page loads with the loader data.

olive warren
#

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

reef ermine
#

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.

olive warren
#

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

craggy zenith
#

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

reef ermine
#

Oh I like that idea. Thanks

north solstice
craggy zenith
craggy zenith