Content pfp
Content
@
https://warpcast.com/~/channel/react
0 reply
0 recast
0 reaction

Darryl Yeo đŸ› ïž pfp
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 đŸ”” pfp
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 đŸ”” pfp
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