loading...

Discussion on: Accessing React State right after setting it

Collapse
rajatkantinandi profile image
Rajat Kanti Nandi

I faced similar problem implementing react native version of a 2048 game variation & used settimeout of 100ms & get rid of the problem & later figured out that setState is async & modified the code to use the callback.

Collapse
dance2die profile image
Sung M. Kim Author

It seems like you, & I (and this other person) has a similar thought process 😅.

Collapse
kevinejiro profile image
Ogidigbo Ejiro

lol me too !!!