What is 'useState' in React?
useState is a hook in React. Hooks were introduced in React so that you can use state and lifecycle methods in functional components.
Let's say you want a simple like counter app.
import React from 'react';
const App = () => {
let counter = 0;
...
kartik-choudhary.hashnode.dev3 min read
Jitendra Kumar
very well written sir.