Questions tagged [react-hooks]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
130 views

Preventing parent component re-rendering of a big React component when you "Lift State Up"

I have a very big form - let's call it <MyForm> - consisting of the following: text fields and dropdowns custom selector made of selectable cards table input (for this example 50 rows with each ...
user avatar
  • 121
-2 votes
1 answer
58 views

React class or function for stateful components?

Which is better to use? react class based stateful component or react hooks functional stateful component? I've searched a bit but couldn't find what is preferred to use.
user avatar
  • 101
2 votes
0 answers
133 views

React Hooks: using state in useEffect without depending on it

I have run into a situation in React where I want to run a function F in a useEffect hook whenever a value V1 from the store changes. F uses another value from the store V2. I only want to run F when ...
user avatar
  • 587