setState how does it work 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);