S
S
shading2020-01-24 22:40:04
JavaScript
shading, 2020-01-24 22:40:04

Doesn't the state change immediately after onChange fires?

After onChange fires, the state only changes after any next action. Why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
abberati, 2020-01-24
@shading

Because setState is asynchronous

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question