1 min readJun 17, 2020
Good article! I do have one comment:
I notice you use setState statements on top of each other. setState is asynchronous so if there are two setState statements on top of each other the second one probably won't get called properly.
It's better if you have the second setState statement as a callback of the first one.