Questions tagged [react-hooks]
The react-hooks tag has no summary.
4 questions
-1 votes
1 answer
621 views
ReactJS hook vs utility function
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 ? '' :...
-2 votes
1 answer
85 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.