how to set state in react js on onclickhooks code example Example: usestate const [count, setCount] = useState(0);