Запитання 12
What is the purpose of the functional callback form of setState in React, and when should it be used?
Варіанти відповідей
To update state based on the latest previous state value, preventing bugs in asynchronous or multiple setState calls.
To reset the component state to its initial value.
To perform side effects after state updates.
To batch multiple state updates into a single render explicitly.