Skip to main content

All Questions

-2 votes
1 answer
73 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.
Soul Burn's user avatar
  • 101
2 votes
0 answers
250 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 ...
Ace's user avatar
  • 617