What happens when you call setState in react? code example
Example: setstate in react
Functional Component
const [counter, setCounter] = useState(0);
setCouter(counter + 1);
Functional Component
const [counter, setCounter] = useState(0);
setCouter(counter + 1);