Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

auth provider react

//AuthProvider
import React from 'react';
import { createContext } from 'react';
import useFirebase from '../../hooks/useFirebase';


export const AuthContext = createContext({})

const AuthProvider = ({children}) => {

    const allContext = useFirebase();

    return (
        <AuthContext.Provider value={allContext}>
            {children}
        </AuthContext.Provider>
    );
};

export default AuthProvider;
 
PREVIOUS NEXT
Tagged: #auth #provider #react
ADD COMMENT
Topic
Name
4+5 =