ReactJS - are you setting state correctly ?
TLDR: if your set state depends on current state value, always opt to use the function version of set state.
Here we have a simple Counter component, which has a button that increment the 'count' state.
import { useState } from "react";
function C...
caffeinatedcode.hashnode.dev2 min read