2 ms·
Author is confused. FP is disgusting looking anyway Once React came out with shit like useEffect(() => {}, []) And it was actually good and useful, I ga
by purplemoonx 2mo ago
Author is confused.
FP is disgusting looking anyway
Once React came out with shit like
useEffect(() => {}, [])
And it was actually good and useful, I gave up on code aesthetics. Or rather, moved that thinking into overall comment, spacing, file breakdown and organization.
How the fuck does "useEffect(() => {}, [])" mean a function that will run when the page loads? And then if you do this
useEffect(handleComponentMount, [])
You go to jail in real life. Nobody knows why - it has to be an arrow function.