I'm trying to use setState after I did a fetch on an api so I can load it into react. The problem is that it is a async function so I can't use it inside the class itself. How can I still change the state from outside the class itself?
I have a function async function getUsers() {}
and in the class that's just under it starte = {data: ''}