Jodoo
0
Q:

usestate wait for set

const [loading, setLoading] = useState(false);

...

useEffect(() => {
    doSomething(); // This is be executed when `loading` state changes
}, [loading])
setLoading(true);
0

New to Communities?

Join the community