CleeveCleeve
Back
Open
Dominik 🔮 (@TkDodo) on X

Dominik 🔮 (@TkDodo) on X

💁‍♂️React tip: I think most implementations of `usePrevious` will write to a ref in an effect and return it, but the rules of react advise us to not read refs during render. Here is my implementation, based on what I learned in the new react docs (https://t.co/JltAPkVKi4):