2665 Views
👾At first glance you could have the idea to do something similar to get your content from a remote API as example. const MyFunctionnalComponent: React.FC = (props) => { useEffect(async () => { await loadContent(); }, []); If you're using Typescript, the compiler should be yielding something like this : Argument of type '() => Promise ' is not assignable to parameter of type 'EffectCallback'.
0 comments