Google News
logo
ReactJS - Quiz(MCQ)
Why is it a good idea to pass a function to setState instead of an object?
A)
It is more functional than an object
B)
It automatically updates a component
C)
It makes sure that the object is not mutated
D)
setState is asynchronous and might result in out of sync values.

Correct Answer :   setState is asynchronous and might result in out of sync values.