2 ms·
The wording is unfortunate as I said in another discussion. useEffect is not an escape hatch, it’s a fundamental building block. The point of articles like th
by dgb23 4y ago
The wording is unfortunate as I said in another discussion.
useEffect is not an escape hatch, it’s a fundamental building block.
The point of articles like these is that people use useEffect when they don’t need them. So it’s robust advice in that regard!
But you’re always going to use it, directly or indirectly.
For example if you’re doing anything interesting with your layout that CSS can’t exprees, which is fairly often, you’re going to need useEffect in order to read the DOM and calculate your layout.