This is a Next.js x Firebase boilerplate that includes following;
- chakra-ui
- Configured Firebase auth context, use
useAuthCtx
to retrieve current user
Install packages and run the development server:
npm install
# or
yarn
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the result.
const {currentUser, loading, setCurrentUser} = useAuthCtx()
// currentUser: firebase.User | null
// loading: boolean
// setCurrentUser: (user?: firebase.User) => void
MIT