Ability to block initial render while using a loader #2860
thomasballinger
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to be able to use a loader in the same component as a
useSuspenseQuery
and block the render. Today this is possible from routes/__root.tsx but in routes/index.tsx.@schiller-manuel noted in https://discord.com/channels/719702312431386674/1306383344778346547/1306383344778346547 that
What's the thought here, is this fundamentally required? I could see myself keeping my app/routes/__root.tsx as minimal as possible if I wanted this blocking experience to be triggered by using a
useSuspenseQuery()
.this sound related to #2026?
To reproduce this, run
and then replace
app/routes/index.tsx
withYou'll see that the __root.tsx layout loads first, then the index.tsx pops in.
Screen.Recording.2024-11-25.at.4.58.32.PM.mov
Beta Was this translation helpful? Give feedback.
All reactions