Web / ReactJS Interview questions
Why should we not update the react component state directly?
If you try to update state directly then it won't re-render the component.
use setState() method to update the state of a variable. It schedules an update to a component's state object. When state changes, the component responds by re-rendering.
More Related questions...