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
With this basic setup, using useLazyLoadQuery with network-only to make a new fetch() call on render. The code works fine in v18, but after upgrading to v19, it starts remounting an element infinitely.
React v19 workaround 2: Wrap the parent (which is just a context provider with nothing special) by one more <Suspense> boundary. It seems to do not make sense, but it works.
The expected behavior is that the <Suspense> boundary is retained stable, and the <NetworkOnly> is rendered after waiting for the QueryResource fulfilled.
However, this seems to me like the <Suspense> could suspend itself.
The text was updated successfully, but these errors were encountered:
So for starters, I would just like to ask, what exactly you are looking to resolve this?
Like for say, we can stay on the v18.
Is upgradation so much important ?
Summary
The reproduction is using Relay, but I came as this seems closer to a bug in React than Relay.
https://stackblitz.com/@cometkim/collections/react-relay-suspend-loop
With this basic setup, using
useLazyLoadQuery
withnetwork-only
to make a newfetch()
call on render. The code works fine in v18, but after upgrading to v19, it starts remounting an element infinitely.<StrictMode>
seems to solve the issue.<Suspense>
boundary. It seems to do not make sense, but it works.The expected behavior is that the
<Suspense>
boundary is retained stable, and the<NetworkOnly>
is rendered after waiting for the QueryResource fulfilled.However, this seems to me like the
<Suspense>
could suspend itself.The text was updated successfully, but these errors were encountered: