Is there a way to refresh / render a function component once after updating multiple states?
For example:
const [first, setFirst] = useState(false);
const [second, setSecond] = useState(false);
when called ...
...
setFirst(true);
setSecond(true);
... then the component will refresh twice. Is it possible to set both and refresh (or render) only once?