Content pfp
Content
@
0 reply
0 recast
0 reaction

androidsixteen 🌲 pfp
androidsixteen 🌲
@androidsixteen.eth
I miss explicit component lifecycle methods in React like `componentDidMount` Felt far easier to reason about than 15 `useEffect` functions littered in the component where you have to inspect the dependency array to know what's going on Am I just being redacted / is there a better approach here?
9 replies
2 recasts
19 reactions

Marc pfp
Marc
@marcgarcia.eth
Why not “useMount = useEffect”?
1 reply
0 recast
0 reaction

Royal pfp
Royal
@royalaid.eth
It's just understanding the shift to a slightly more implicit behavior. I think hooks, and the implicit return cleanup function, co-locate logic better.
1 reply
0 recast
2 reactions

links 🏴 pfp
links 🏴
@links
I am also react boomer and when I recently used react was introduced to all the glory of useEffect. I prefer explicit over implicit but maybe implicit is how you get more framework users.
0 reply
0 recast
1 reaction

Tony D’Addeo pfp
Tony D’Addeo
@deodad
no it’s just ugly and foot gun
0 reply
0 recast
1 reaction

nick pfp
nick
@nickysap
The better approach is Svelte
0 reply
0 recast
1 reaction

typeof.eth 🔵 pfp
typeof.eth 🔵
@typeof.eth
Overall I prefer modern React, but having prevProps and prevState in componentDidUpdate was pretty handy too
0 reply
0 recast
1 reaction

Mikko pfp
Mikko
@moo
You need some Svelte for your React headaches
0 reply
0 recast
0 reaction

phragg pfp
phragg
@phragg
15 useEffect's mean that you need to decouple things / create a custom hook.
0 reply
0 recast
0 reaction

Yannis pfp
Yannis
@yanneth
I prefer modern react but always good to think wether you need and effect or not haha
0 reply
0 recast
0 reaction