Reactjs – React Asynchronous states Problem – state in Context set to true but remains false in the component (React authentication with Context and API call)
I have a problem with asynchronous states on React I use context to determine whether the admin is authenticated and has the right to access a page with a state called isAuth interface UserContext { setToken: (token:string) => void; getToken:…