DEV Community

Vishnu Priya S
Vishnu Priya S

Posted on

React Hooks (useState)

In useState it allows the component to store and manage data and with the help of setter function it update to the variable which automatically re-render the component and display in the UI

eg: const [count, setCount] = useState(0);

count --> variable
setCount --> function
useState(0) --> Initial value

Top comments (0)