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
When testing the new prewarming, I ran across a situation where an effect / state change in the parent seems to break prewarming. This only happens with use(), not with throw promise:
I have not explored exactly under which circumstances this happens.
I did not find this in a real app, it happened when I was testing edge cases with React Query and noticed useSuspenseQuery worked as expected (throw promise) and { promise } = useQuery(...); use(promise) did not in one case.
I am not sure this is a bug or intentional behaviour, but wanted to file it since it behaves differently with use(promise) and throw promise.
The text was updated successfully, but these errors were encountered:
Summary
When testing the new prewarming, I ran across a situation where an effect / state change in the parent seems to break prewarming. This only happens with
use()
, not withthrow promise
:https://codesandbox.io/p/sandbox/sibling-suspense-use-reproduction-lmscnl
I have not explored exactly under which circumstances this happens.
I did not find this in a real app, it happened when I was testing edge cases with React Query and noticed
useSuspenseQuery
worked as expected (throw promise
) and{ promise } = useQuery(...); use(promise)
did not in one case.I am not sure this is a bug or intentional behaviour, but wanted to file it since it behaves differently with
use(promise)
andthrow promise
.The text was updated successfully, but these errors were encountered: