React

Introduction to React - Usestate() hook in React

21.

Which of the following is true about the useState() hook in React?

It can only be used in class components.

It can be used multiple times within a single functional component.

It can only be used for primitive data types like string or number.

It is used for handling asynchronous operations.