SyntaxFix
Write A Post
Hire A Developer
Questions
Set: const [state, setState] = useState(1);
const [state, setState] = useState(1);
Toggle: setState(state*-1);
setState(state*-1);
Use: state > 0 ? 'on' : 'off';
state > 0 ? 'on' : 'off';