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 recently checked this video, and I am trying to achieve similar effect with single-fetch, since defer seems deprecated.
The docs suggest one can simply return the naked promise. However, this is not the case in this demo. The fetcher continues loading until the promise resolves, and the fallback of Suspense never show.
Did I miss something? What is the correct way to handle this? And if the fetcher (or useLoaderData) can only return promises when they resolved, what would be the benefits doing so?
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I recently checked this video, and I am trying to achieve similar effect with single-fetch, since
defer
seems deprecated.The docs suggest one can simply return the naked promise. However, this is not the case in this demo. The
fetcher
continues loading until the promise resolves, and the fallback ofSuspense
never show.Did I miss something? What is the correct way to handle this? And if the fetcher (or
useLoaderData
) can only return promises when they resolved, what would be the benefits doing so?Beta Was this translation helpful? Give feedback.
All reactions