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/coreto 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
.envfile 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.jsusingprocess.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-cmdALREADY DONE ✔️Change thepackage.jsonfilescriptsection to useenv-cmdcommand:"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-toolsfirebase loginfirebase initnpm run buildfirebase deploy