skip to Main Content

Reactjs – react's useState does not sets new state

I have the following frontend: AuthContext.js: const { createContext, useState, useContext } = require("react"); const AuthContext = createContext(); export function useAuth() { return useContext(AuthContext); } export function AuthProvider({ children }) { const [auth, setAuth] = useState(); return ( <AuthContext.Provider value={{…

VIEW QUESTION
Back To Top
Search