Запитання 4
What happens if you call setState during the render phase of a React component?
Варіанти відповідей
It throws an infinite loop error because setState triggers another render immediately.
It queues the state update to be applied after the render completes.
It synchronously updates the state without causing additional renders.
It is ignored silently to prevent conflicts during rendering.