Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react pass object to state

//declarate react object state as simple state
const [stateObj, setStateObj] = useState({
    state1: val1,
    state2: val1,
  	....
  	staten: valn,
  });
 
PREVIOUS NEXT
Tagged: #react #pass #object #state
ADD COMMENT
Topic
Name
8+7 =