await in useEffect()
Nov 7, 2020
Ok, you see that useEffect() do not accept await syntax.
Solution:
useEffect(()=>{
(async function foo() {
await loadContent();
})();
});
Ok, you see that useEffect() do not accept await syntax.
Solution:
useEffect(()=>{
(async function foo() {
await loadContent();
})();
});
Don’t follow me. I wrote junks here. Follow me on Twitter instead.