uesstate react different examples
Example 1: update state in useState hook
// declare state using useState hook.
// someState is set to someInitialState
const [someState, setSomeState] = useState(someInitialState);
// setSomeState updates the current state
setSomeState(someOtherState);
Example 2: usestate
const [count, setCount] = useState(0);