Why is the usage of setState?

Q & ACategory: React JSWhy is the usage of setState?
Admin Staff asked 2 years ago

Why is the usage of setState?

a) Invoke code after the setState operation is done.

b) Replace the state completely instead of the default merge action.

c) Access the previous state before the setState operation.

d) None of the above

1 Answers
Admin Staff answered 2 years ago

a) Invoke code after the setState operation is done