You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to make pendingComponent the only thing that renders in the app when the route loader is still fetching. Is this possible?
Right now when I try to do so it doesn't render anything and the whole webiste is empty.
I want to use it like this:
constRoute=createFileRoute('/_authenticated/_main/dashboard')({loader: async({ context })=>context.queryClient.ensureQueryData(userQueryOptions()),component: Component,pendingComponent: ()=><div>Someloader</div>,});functionComponent(){const{ user }=Route.useLoaderData();return<div>{user.name}</div>;}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I want to make
pendingComponent
the only thing that renders in the app when the routeloader
is still fetching. Is this possible?Right now when I try to do so it doesn't render anything and the whole webiste is empty.
I want to use it like this:
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions