Sign in
Log inSign up
Max Stoiber @ šŸ‡¦šŸ‡¹ on Twitter: "šŸ”„ TIL: setState accepts a callback, which gets passed the previous state!

šŸ‘± via @dan_abramov's https://t.co/tqVh4uoI6f https://t.co/GPWUIVKWu2"

Max Stoiber @ šŸ‡¦šŸ‡¹ on Twitter: "šŸ”„ TIL: setState accepts a callback, which gets passed the previous state! šŸ‘± via @dan_abramov's https://t.co/tqVh4uoI6f https://t.co/GPWUIVKWu2"

Mike Cornish's photo
Mike Cornish
Ā·Oct 1, 2016

Did you know that this is the safe way to use React's setState method? News to me.