Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

prevstate in usestate

const [prevState, setState] = React.useState([]);

setState(prevState => [...prevState, 'somedata'] );
 
PREVIOUS NEXT
Tagged: #prevstate #usestate
ADD COMMENT
Topic
Name
7+1 =