Questions tagged [react-hooks]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2
votes
1answer
45 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.
2
votes
0answers
30 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 ...