Skip to main content

Questions tagged [react-hooks]

-1 votes
1 answer
628 views

Should we use utility functions in react or should everything be components and hooks? I had this scenario: Utility function for formatting money. const formatMoney = (value) => value == null ? '' :...
Oki's user avatar
  • 117
1 vote
2 answers
3k views

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 ...
Hans's user avatar
  • 121
2 votes
0 answers
264 views

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
  • 637
-2 votes
1 answer
85 views

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