<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Muhammad Shahryiar</title>
    <description>The latest articles on DEV Community by Muhammad Shahryiar (@mshahryiar).</description>
    <link>https://dev.to/mshahryiar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F902469%2F3140d7e1-9b59-4110-bc1d-9c018bfbde25.jpeg</url>
      <title>DEV Community: Muhammad Shahryiar</title>
      <link>https://dev.to/mshahryiar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mshahryiar"/>
    <language>en</language>
    <item>
      <title>How to install React?</title>
      <dc:creator>Muhammad Shahryiar</dc:creator>
      <pubDate>Thu, 04 Aug 2022 04:42:29 +0000</pubDate>
      <link>https://dev.to/mshahryiar/how-to-install-react-15a9</link>
      <guid>https://dev.to/mshahryiar/how-to-install-react-15a9</guid>
      <description>&lt;p&gt;ReactJs is one of the most widely used Javascript front-end libraries created by Facebook. It is used for mobile and web application development. React contains a collection of reusable code snippets used for building UI, called components.&lt;/p&gt;

&lt;p&gt;ReactJS also allows you to create your own components and use them to create complex UIs.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                    ## Table of Contents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;How to install Node js in windows&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Verify the installation&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Create React Project&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Run React App&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. How to install node js in windows
&lt;/h2&gt;

&lt;p&gt;The first step you need to do, before you start coding in ReactJS, is to install Node JS. Node.js is a JavaScript runtime built on Chrome’s V8 JavaScript engine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ia9ru28e89cjrddkvrm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0ia9ru28e89cjrddkvrm.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Node JS for windows&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5sqjbujy1oiompkm3at.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx5sqjbujy1oiompkm3at.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Click on Run&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fto6xukcwvr2dlkgjb4lp.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fto6xukcwvr2dlkgjb4lp.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Click Next&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs641l63ebh3wlouqbkkm.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs641l63ebh3wlouqbkkm.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Accept the terms and click on Next&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg9t6qrb6etblrqk3mla.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feg9t6qrb6etblrqk3mla.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Select your directory and click on Next&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5e8i1btbvwbbq470yje5.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5e8i1btbvwbbq470yje5.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Click Next&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Facmi4m0i69f68kwzn2as.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Facmi4m0i69f68kwzn2as.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Skip this process – Click Next&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffhf674f809e6a6th46ia.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffhf674f809e6a6th46ia.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Click Install and it will install NodeJS to your machine&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Verify the installation
&lt;/h2&gt;

&lt;p&gt;Now that we have installed NodeJS. Let’s make sure that it is installed correctly with npm ( node package manager).&lt;/p&gt;

&lt;p&gt;Run the following command in the cmd to check the node version.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\Username&amp;gt; node -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it displays some version number, then it means we have successfully installed nodeJS to our machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnxrhijk4wvioyzlidtcn.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnxrhijk4wvioyzlidtcn.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
check node version&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\Username&amp;gt; npm -v  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will display some version number if everything installs correctly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hqw1w4749fb7dty8pif.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2hqw1w4749fb7dty8pif.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
check NPM version&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Create React Project
&lt;/h2&gt;

&lt;p&gt;Now that everything is working correctly, we will move on to creating our very own ReactJS project. To do so, you will need to go the directory, where you want to have your project. And run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;C:\Users\Username&amp;gt; npx create-react-app myfirstreactapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Note: Your react project name should be lowercase.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwcv9e1mvnb5t3vtdja2h.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwcv9e1mvnb5t3vtdja2h.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
Creating a new React project&lt;/p&gt;

&lt;p&gt;The above command will take sometime to create a new project with the name “myfirstreactapp.” Now, we can see the terminal as like below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39m9agz3n0zb13gdriri.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F39m9agz3n0zb13gdriri.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
React Project installed correctly&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Run React App
&lt;/h2&gt;

&lt;p&gt;The above screen confirms successful creation of our project. Now, we need to start the server so that we can access the application on the browser.&lt;/p&gt;

&lt;p&gt;Type the following command in the cmd:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This is go into our react project. 
cd myfirstreactapp 


npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Doing so, will start our ReactJS project, which we can access on our local browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fi6czcz9s4neg8l7klw.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fi6czcz9s4neg8l7klw.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
React project running successfully&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb374rzev1qikmwe6yyms.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb374rzev1qikmwe6yyms.PNG" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
React project running in our local browser&lt;/p&gt;

&lt;p&gt;We have successfully ran our own ReactJs project.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Conclusion
&lt;/h2&gt;

&lt;p&gt;I hope that was easy for everyone to follow. As we have seen above, it’s really easy to install and run ReactJs on our system using NodeJS. Using create-react-app allows us to create ReactJs project immediately and we can start coding right away. &lt;/p&gt;

&lt;p&gt;For more articles, visit: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://techwithsherry.com/" rel="noopener noreferrer"&gt;Tech With Sherry&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Related Article: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://techwithsherry.com/bootstrap-with-react/" rel="noopener noreferrer"&gt;Beginners guide to React and Bootstrap&lt;/a&gt; - Create Responsive Layout in React&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>React Firebase Authentication tutorial</title>
      <dc:creator>Muhammad Shahryiar</dc:creator>
      <pubDate>Wed, 03 Aug 2022 04:23:30 +0000</pubDate>
      <link>https://dev.to/mshahryiar/react-firebase-authentication-tutorial-1eag</link>
      <guid>https://dev.to/mshahryiar/react-firebase-authentication-tutorial-1eag</guid>
      <description>&lt;p&gt;Learn how to use Firebase authentication for user registration, sign-in functionality for end users. It provides an end-to-end identity solution, supporting email and password accounts, phone authentication and social media logins. In this tutorial, we will look at Firebase authentication using Email and Password.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Create Firebase Project
&lt;/h2&gt;

&lt;p&gt;First, visit Firebase Console using the following URL – &lt;a href="https://console.firebase.google.com"&gt;https://console.firebase.google.com&lt;/a&gt;. Login using your Google Account – You will be able to create a new project in only 3 Steps.&lt;/p&gt;

&lt;p&gt;I. Create a new project. Give it a name and click continue.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--bOP-94Ry--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5cpblhyui8waijhhv4y5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--bOP-94Ry--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5cpblhyui8waijhhv4y5.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;II. Next you will be asked if you want Google Analytics for your project. You can skip this step and come back to it later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RR2F46U2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vnlqp93gnkgo302s1bti.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RR2F46U2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vnlqp93gnkgo302s1bti.png" alt="Image description" width="880" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;III. After that, it will start to create your new project on Firebase. The process should take just a few seconds, once done click continue and you will be taken to projects homepage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VlUZuXul--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hv79hatozp4qu3fykbdl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VlUZuXul--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hv79hatozp4qu3fykbdl.png" alt="Image description" width="300" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DHl5qhsJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iyb71161zlcx993bqimj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DHl5qhsJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iyb71161zlcx993bqimj.png" alt="Image description" width="300" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LWKhL-2U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/emv0bv4vgbh0apw6wj55.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LWKhL-2U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/emv0bv4vgbh0apw6wj55.png" alt="Image description" width="880" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Install Firebase CLI
&lt;/h2&gt;

&lt;p&gt;Install Firebase using npm:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install firebase&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Initialize Firebase
&lt;/h2&gt;

&lt;p&gt;Initialize Firebase in your app and create a Firebase App object. Furthermore, You will find your firebase config in your project settings, after you add your App in the project.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { initializeApp } from 'firebase/app';
import { getFirestore } from 'firebase/firestore/lite';
import { getAuth  } from "firebase/auth";

const firebaseConfig = {
    apiKey: "**************",
    authDomain: "*********.firebaseapp.com",
    projectId: "*********",
    storageBucket: "*********.appspot.com",
    messagingSenderId: "*********",
    appId: "***********"
  };


const app = initializeApp(firebaseConfig);
const auth = getAuth();
const db = getFirestore(app);

export {auth , db};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Put the above lines of code in firebaseHandler.js ( or any other name you want for your Firebase Configuration file ).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9-piKnli--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1c55gtr2qvamil1ouxe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9-piKnli--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s1c55gtr2qvamil1ouxe.png" alt="Image description" width="880" height="331"&gt;&lt;/a&gt;&lt;br&gt;
Connect Firebase to your app to start using it&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HDPvNP6T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3wwmm6exdue2ln9tv8ki.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HDPvNP6T--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3wwmm6exdue2ln9tv8ki.png" alt="Image description" width="880" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--25Qll2Pf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d8jsj3lbvaqz68g1l14z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--25Qll2Pf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d8jsj3lbvaqz68g1l14z.png" alt="Image description" width="768" height="515"&gt;&lt;/a&gt;&lt;br&gt;
Firebase Configuration&lt;/p&gt;

&lt;p&gt;Once you add your web app to Firebase, you will have access to Firebase Config file, which will let you connect to Firebase and use required resources. Firebase configuration will be under Project Settings.&lt;/p&gt;

&lt;p&gt;Finally, the connectivity between our app and Firebase is done. We can now move on to Authentication using Firebase and React.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Redux Introduction
&lt;/h2&gt;

&lt;p&gt;To begin with, Redux is state management for your react app. It stores information in a store (centralized location). It manages the state and data of your application.&lt;/p&gt;

&lt;p&gt;Building Parts of redux:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Action:&lt;br&gt;
Actions are payload of information that send data from your application to your store. They are the only source of information for the store. This means if any state change is necessary the change required will be dispatched through the actions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reducer:&lt;br&gt;
“Actions describe the fact that something happened, but don’t specify how the application’s state changes in response. This is the job of reducers.”&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When an action is dispatched for state change, it’s the reducers duty to make the necessary change to the state and return the new state of the application.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store:
A Store can be created with the help of reducers which holds the entire state of the application. The recommended way is to use a single store for the entire application rather than having multiple stores which will violate the use of redux, which only has a single store.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ul6VWeK2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ola7xewoecl4xdc16bn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ul6VWeK2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ola7xewoecl4xdc16bn.png" alt="Image description" width="768" height="768"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install Redux
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# NPM
npm install @reduxjs/toolkit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Create a Redux React App
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Redux + Plain JS template
npx create-react-app my-app --template redux
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Creating Slice for storing User Information
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {  createSlice } from '@reduxjs/toolkit';

const initialState = {
  user: null,
};

export const userSlice = createSlice({
  name: 'user',
  initialState,

  reducers: {
    login:(state, action)=&amp;gt;{
      state.user = action.payload;
    },
    logout:(state, action)=&amp;gt;{
      state.user = null;
    }
  }
});

export const { login, logout } = userSlice.actions;

export const selectUser = (state) =&amp;gt; state.user.user;


export default userSlice.reducer;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Configured Store that holds the entire state of the user/application
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { configureStore } from '@reduxjs/toolkit';
import userReducer from '../features/userSlice';

export const store = configureStore({
  reducer: {
    user: userReducer,
  },
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;The above code, creates a user slice to store user information (centrally), with some initial state value.&lt;/p&gt;

&lt;p&gt;Reducers are pure functions in Redux, which are the only way to change states in Redux. It is the only place where you can write logic and calculations. Reducer function will accept the previous state of app and action being dispatched, calculate the next state and returns the new object.&lt;/p&gt;

&lt;p&gt;So, in the above code, we have used two reducers. Login and Logout. Once the user enters correct information, the login reducer will be activated, and it will update the user state to the logged in user’s state.&lt;/p&gt;

&lt;p&gt;While, logout reducer will set the user state to null, which will update across the entire app, thanks to the redux.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Sign In and user registration using Firebase Authentication
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useRef } from 'react'
import "./signUpScreen.css";


// importing from our Firebase Config file.
import { auth } from '../firebaseHandler';


// Importing functions from Firebase Authentication
import {createUserWithEmailAndPassword,signInWithEmailAndPassword  } from "firebase/auth";


// Creates a new User 
function SignUpScreen() {
  const emailRef = useRef(null);
  const passwordRef = useRef(null);

  const register = (e) =&amp;gt; { 
    e.preventDefault();   

    createUserWithEmailAndPassword(auth, emailRef.current.value, passwordRef.current.value)           
          .then((authUser)=&amp;gt;{
            console.log(authUser)
        }).catch(error=&amp;gt;{
          alert(error.message)
        });

  }



// Sign In using Email and Password
  const signIn = (e) =&amp;gt; { 
    e.preventDefault();

    signInWithEmailAndPassword(auth, emailRef.current.value, passwordRef.current.value)
    .then((authUser)=&amp;gt;{
      console.log(authUser);
    }).catch(error=&amp;gt;{
      alert(error.message)
    });

}

  return (
    &amp;lt;div className='signUpScreen'&amp;gt;
      &amp;lt;form&amp;gt;
        &amp;lt;h1&amp;gt;Sign In&amp;lt;/h1&amp;gt;
        &amp;lt;input ref={emailRef} placeholder='Email' type="input"/&amp;gt;
        &amp;lt;input ref={passwordRef} placeholder='Password' type="password"/&amp;gt;
        &amp;lt;button type='submit' onClick={signIn}&amp;gt;Sign In&amp;lt;/button&amp;gt;

        &amp;lt;h4&amp;gt;New to Netflix? &amp;lt;strong onClick={register}&amp;gt;Sign up now.&amp;lt;/strong&amp;gt;&amp;lt;/h4&amp;gt;
      &amp;lt;/form&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}

export default SignUpScreen;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In addition, we are going to use Firebase’s built-in:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;CreateUserWithEmailAndPassword,&lt;br&gt;
signInWithEmailAndPassword&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;functions to register users using Firebase. And once the registration is successful, helps to easily login.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. React Navigation and Authentication
&lt;/h2&gt;

&lt;p&gt;If you have ever coded in React before, you will definitely know App.js file in react projects. It’s the essential file in every React App.&lt;/p&gt;

&lt;p&gt;We will now implement &lt;a href="https://techwithsherry.com/routing-react-js/"&gt;React Navigation&lt;/a&gt; to navigate to different pages, based on whether user is logged in or not.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useEffect } from 'react';
import './App.css';

import HomeScreen from './screens/HomeScreen';
import ProfileScreen from './screens/ProfileScreen';

import {BrowserRouter, Routes, Route} from "react-router-dom";
import LoginScreen from './screens/LoginScreen';
import { auth } from './firebaseHandler';
import { useDispatch, useSelector } from "react-redux";
import { login,logout, selectUser } from './features/userSlice';

function App() {
  const user = useSelector(selectUser);
  const dispatch = useDispatch();

  useEffect(()=&amp;gt;{
    const unsubscribe = auth.onAuthStateChanged(userAuth=&amp;gt;{
      if(userAuth){
        //Logged In
        dispatch(
          login({
          uid:userAuth.uid,
          email:userAuth.email,
        })
        );
      }
      else{
        // Logged Out
        dispatch(logout());
      }
    })

    return unsubscribe;

  },[dispatch]);


  return (
    &amp;lt;div className="app"&amp;gt;
      &amp;lt;BrowserRouter&amp;gt;
      {
        !user  ? (
          &amp;lt;LoginScreen/&amp;gt;
        ) : (

        &amp;lt;Routes&amp;gt;
          &amp;lt;Route path="/" element={&amp;lt;HomeScreen/&amp;gt;}/&amp;gt;
          &amp;lt;Route path="/profile" element={&amp;lt;ProfileScreen/&amp;gt;}/&amp;gt;
        &amp;lt;/Routes&amp;gt;
        )

      }
      &amp;lt;/BrowserRouter&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;App.js&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;useSelector&lt;/strong&gt;&lt;br&gt;
useSelector, selects logged in user from redux user’s Slice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;useDispatch&lt;/strong&gt;&lt;br&gt;
useDispatch dispatches user’s information to redux user’s slice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Login&lt;/strong&gt;&lt;br&gt;
We created Login Reducer earlier, which helps us to stores user information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Logout&lt;/strong&gt;&lt;br&gt;
Finally, logout will clear the user’s state.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thank you for reading till the end. We now know how to implement Firebase Authentication in react. It took me sometime to figure out how to implement Firebase version 9.8.4, because a lot has changed from version 8 to version 9. I hope this blog article helps others to properly implement Firebase Authentication.&lt;/p&gt;

&lt;p&gt;Moreover, we have also implemented React Navigation in our project as well. Which helps us to navigate to a different page. The complete article on React Navigation is &lt;a href="https://techwithsherry.com/routing-react-js/"&gt;available here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Github link to the whole repository is &lt;a href="https://github.com/MShahryiar/Netflix-clone"&gt;here&lt;/a&gt;. For more articles, you can visit my blog: &lt;a href="https://techwithsherry.com/"&gt;TechwithSherry.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>firebase</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
