Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

toggle state react

const [check, setCheck] = useState(false);
// ...
setCheck(prevCheck => !prevCheck);
 
PREVIOUS NEXT
Tagged: #toggle #state #react
ADD COMMENT
Topic
Name
3+2 =