Skip to content

Instantly share code, notes, and snippets.

View parvezmrobin's full-sized avatar

Parvez M Robin parvezmrobin

View GitHub Profile
import React, {createContext, useState} from 'react';
import firebase from '../firebase';
export const ChatContext = createContext();
const ChatContextProvider = (props) => {
//Firebase settings
const DB = firebase.firestore();
const chatRef = DB.collection("chats");