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
18 reactions

Harris pfp
Harris
@harris-
Man I had this exact issue a few months ago debugging a missed dependency for a usememo in code I didn't write
1 reply
0 recast
1 reaction

Harris pfp
Harris
@harris-
A better one for me was losing almost a week to doing something conditionally if supplying the tx to monitor vs not supplying the tx to fetch next available: It only failed on the first one in the list because as a big num evaluates to false in js so when checking if (tx :? Bignum) it would always be false for index 0n kms myself fr
1 reply
0 recast
1 reaction