1
2Pierre Ortega
3@4ever
41:46am
5const Toggle = () => {
6 const [isToggledOn, setToggle] = useState(false)
7 const toggle = () => setToggle(!isToggledOn)
8 return (
9 <button onClick={toggle}>
10 {isToggleOn ? 'ON' : 'OFF'}
11 </button>
12 )
13}