-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
Hi
I am getting this error and i am not able to figure out what is wrong with my auth hook.
useAuth.jsx
import { useContext } from "react";
import AuthContext from "../context/AuthProvider";
const useAuth = () =>{
return useContext(AuthContext);
}
export default useAuth;
AuthProvider
import { createContext, useState } from "react";
const AuthContext = createContext({});
export const AuthProvider = ({Children}) =>{
const [auth, setAuth] = useState();
return(
<AuthContext.Provider value={{auth, setAuth}}>
{Children}
</AuthContext.Provider>
)
}
export default AuthContext;
I am not able to see homepage without removing authprovider either. Anybody else faced this issue?
Any help will be much appriciated
Regards
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels