//Was original state const [x, setX] = useState(0); const [y, setY] = useState(0); //Refactorerd state const [position, setPosition] = useState({ x: 0, y: 0 });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter