3 ms·
Edit: okay, the docs show cases where there are no side-effects. For me it’s completely obvious not to use a hook for that… Aren’t useState and useEffect the t
by andix 4y ago
Edit: okay, the docs show cases where there are no side-effects. For me it’s completely obvious not to use a hook for that…
Aren’t useState and useEffect the two main building blocks for hooks (besides useContext)? Everything is derived from those two.
So I don’t get how it would be wrong to handle any of those things with useEffect. It may not be the most easy to read code, but in the end it’s all useState and useEffect under the hood.