How not to update states in React!!
How do you guys update your state if it depends on the previous value?
Simple!!
...
const [counter, setCounter] = useState(0);
const updateCounter = () => {
setCounter( counter + 1 );
}
...
If you are doing the same as above, You are doing it w...
nehalmahida.hashnode.dev2 min read