Re:React I love you, but you're bringing me down
by phailhaus on Tuesday September 20, 2022 @12:53PM
(#32914494)
Yeah, it's not great, but that's because it's extremely general purpose. Its name refers to function side-effects. Since you're writing your components functionally, you need to explicitly declare any effects of your function to be run appropriately. Hence: `useEffect`. The names are super generalized because hooks don't necessarily need to render anything; they're just hooks into the React scheduler, so they can even be used to manage connection state if you want.
Re:React I love you, but you're bringing me down
by dragonwriter on Tuesday September 20, 2022 @09:40PM
(#32919997)
> What am I using?
The effect.
> What is the effect?
The state-modifying (and thus side-effect-producing, or simply “effectful”) function passed as the first argument to useEffect.
What am I using? What is the effect?