React

Introduction to React - Use of state to manage com...

3.

How can you update the state in React?

By creating a new instance of the state object.

By directly modifying the state object.

By using the setState method.

React does not allow state updates.