`useState` and `prevState`
There's a way to update your React state more efficiently using the prevState with a callback in setState function.
const [name, setName] = useState('');
const [address, setAddress] = useState('');
const [phone, setPhone] = useState('');
// we have ...
quan-ng.hashnode.dev1 min read