Facebook clone with React.
Firebase for Hosting, Google athentication(Full Log-In) and real time Database.
- React + React HOOKS
- React Context API -> REDUX pattern
- MATERIAL UI (Icons)
is a library for css. One of the most popular css libraries. brings pristine icons.
_ on terminal, install
npm install @material-ui/core
to your local repository and installnpm install @material-ui/icons
. _ more icons can be found here - FLEXBOX (responsive)
- firebase's Firestore realtime DB
- Firebase Hosting
- Firebase Google Authentication (Full Log-In)
firebase lets you host all the data you want
real time database
Google's eco system on the back (firebase
, google authentication
) and react
on the front :ties together
- Create
.env
file in the root of your project & add it to.gitignore
- Copy whats inside env.example & modify according to your firebase env variables. Make sure each variable name starting with
REACT_APP_
- Access the variables directly in your
firebase.js
usingprocess.env.REACT_APP_INSERT_VARIABLE_NAME_HERE
. Check firebase.js ALREADY DONE ✔️
To access the environment-specific file, install the env-cmd npm package using the following command:npm install env-cmd
ALREADY DONE ✔️
Change thepackage.json
filescript
section to useenv-cmd
command:"start": "env-cmd -f .env react-scripts start"
So now, when you run the npm start
command from the terminal, it will load the environment variables from the .env
file.
https://developers.facebook.com/docs/plugins/page-plugin/
use the following code <p>{new Data(timestamp?.toDate()).toUTCString}</p>
npm i -g firebase-tools
firebase login
firebase init
npm run build
firebase deploy