useEffect runs twice with same state after migrating to Turborepo (Next.js + React 19) #10891
Unanswered
asadbekabduvoitov-nordra
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
After migrating our Next.js project at company into a Turborepo workspace, I noticed a change in how useEffect behaves when depending on query state.
I have code like this:
Expected behavior
• The effect should run once per unique message value.
• After setMessage(null), it should not trigger onSubmit again.
• This worked as expected in my previous Next.js setup.
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions