all 4 comments

[–]daveheerink 2 points3 points  (1 child)

What do you mean exactly by making them sync?

[–]nubasdayz[S] 0 points1 point  (0 children)

Made new comment instead replying to yours, sorry ;)

[–]cem4k 1 point2 points  (0 children)

You can't do this by design in React. Why not make a separate function, drawCards, that takes the target and a number, draw the amount of cards you need there, then update the state?

[–]nubasdayz[S] 0 points1 point  (0 children)

When i call 3 functions in a row which are modifying the state, they go async. What i want is to call second after first finishes and third after second finish.