//declarate react object state as simple state const [stateObj, setStateObj] = useState({ state1: val1, state2: val1, .... staten: valn, });