adspace
What is the purpose of callback function as an argument of setstate()?
Answer Posted / Roopendra Kumar
The callback function provided as an argument to `setState()` is used to allow proper updating of state. It is called after the state has been updated, which ensures that if multiple state updates are being made in a short period of time, they will be properly ordered and not overwrite each other.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers