Content
@
https://warpcast.com/~/channel/react
0 reply
0 recast
0 reaction
Darryl Yeo đ ïž
@darrylyeo
Five more hours of my life debugging a React-related issue that I'II never get back đ« Youâre telling me if I want to conditionally render stuff that relies on state from a Provider, I have to break out the entire subtree into a `useMemo` expression to prevent the Provider from resetting its state whenever an unrelated component randomly decides to re-render?? Make it make sense đ€Ą
8 replies
3 recasts
19 reactions
typeof.eth đ”
@typeof.eth
React isnât easy, but if you learn the rules, debugging and fixing stuff like this (or avoiding the issue altogether) becomes second nature. Not saying itâs a you problem, but I feel like React is sold as an easy framework but I disagree with that once a project becomes complex enough.
1 reply
0 recast
1 reaction
typeof.eth đ”
@typeof.eth
Fwiw, I feel like there might be a better solution than useMemo to fix this. Happy to help brainstorm a bit if you want
1 reply
0 recast
1 reaction