DEV Community

Discussion on: Are React Hooks Actually Worth Using?

Collapse
 
vladi160 profile image
vladi160

Both articles uses useEffect for their example, what about others and the idea at all ?

'and about half a dozen state fields' - if you mean, u need to use useState for every state variable, you can do that:

const [state, setState] = useState({/*default state object here */ });