4.
What is the use of state in React?
State is not used in React.
It is used to manage global application data.
It is used to control the flow of the application.
It is used to manage component-specific data.
Correct: D
State in React allows us to manage and update component-specific data. It represents the current state of the component and can be changed over time using the setState method. By using state, we can dynamically update the content of our components, which helps in building interactive and data-driven applications.