Replies: 1 comment
-
As with everything in software, "it depends". There's a fantastic breakdown of each use case and approach on the React docs "You Might Not Need an Effect" page that goes into detail about when to update your state in an even handler vs. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
In my code I use onChange to chnage another value input depend on my input like following
another way is
I prefer the scond method coz it seprate change controller value from change dependent values, but it need more code, which prefered method in your community
Beta Was this translation helpful? Give feedback.
All reactions