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
There are two pages: /a and /b, both pre-generated with SSG.
useSelect is used on page /b.
handleChangeSelectBox is triggered by the onChange event of a select box.
Conditions for Infinite Re-rendering
Navigate from /a to /b for the first time.
Select the value X from the select box.
Navigate back to /a using the browser back button.
Navigate to /b again.
Select the value X again in the select box.
At this point, infinite re-rendering occurs.
Observations
I suspect that RHF's trigger and urql's cache-hit behavior are involved.
However, I find it puzzling that if I switch the select box value from X → Y → X during the initial navigation, even though it triggers a cache hit, the infinite re-rendering does not occur.
Question
What could be the possible cause of this behavior?
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
-
Hi, I have a question regarding RHF and urql.
I'm currently writing a hook like the one below, but I encounter infinite re-rendering under specific conditions.
Context
Conditions for Infinite Re-rendering
At this point, infinite re-rendering occurs.
Observations
Question
What could be the possible cause of this behavior?
Ref
urql
Beta Was this translation helpful? Give feedback.
All reactions