Replies: 3 comments 1 reply
-
I don't think React.use is officially supported yet in Remix, and the Await component is intended to be used with |
Beta Was this translation helpful? Give feedback.
-
Thanks for your response and the information about Just to confirm, does using I'll keep exploring and am open to any other suggestions. Looking forward to more insights. |
Beta Was this translation helpful? Give feedback.
-
I've resolved the issue by adding a Thanks! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Remix Community,
I'm working on a Remix application and encountering a rendering sequence issue, both when using React 18.3's
React.use
and Remix'sAwait
API for asynchronous data fetching. The issue involves:id
parameter updates as part of routing.AsyncComponent
attempts to fetch additional data, either usingReact.use
or within anAwait
component.id
updates first, thenAsyncComponent
renders, showing a "Loading..." state during data fetching.id
update andAsyncComponent
rendering occur simultaneously, bypassing the "Loading..." state.remix-sandbox.mov
Code for reference: https://github.com/shatee/remix-sandbox/blob/master/app/routes/poke.%24id.tsx
I am looking for insights on ensuring a sequential rendering process where the
id
updates occur first, followed byAsyncComponent
displaying its loading state during data fetching. Any advice or suggestions on handling this with eitherReact.use
or Remix'sAwait
API would be greatly appreciated.Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions