<?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: Mohit Maroliya</title>
    <description>The latest articles on DEV Community by Mohit Maroliya (@mohitm15).</description>
    <link>https://dev.to/mohitm15</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%2F708357%2Fc4eadb7c-25ff-476b-a1a0-a23d1945dc83.jpeg</url>
      <title>DEV Community: Mohit Maroliya</title>
      <link>https://dev.to/mohitm15</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mohitm15"/>
    <language>en</language>
    <item>
      <title>my-notebook using MongoDB</title>
      <dc:creator>Mohit Maroliya</dc:creator>
      <pubDate>Wed, 12 Jan 2022 15:23:14 +0000</pubDate>
      <link>https://dev.to/mohitm15/my-notebook-using-mongodb-2ej6</link>
      <guid>https://dev.to/mohitm15/my-notebook-using-mongodb-2ej6</guid>
      <description>&lt;h3&gt;
  
  
  Overview of My Submission
&lt;/h3&gt;

&lt;p&gt;Today, writing notes is very important in order to stay organised. Especially in Corperate sector, When you write all your tasks in form of notes, they seem more manageable. When you've got a clear outline of the tasks you've got to do and those you've completed, it helps you stay focused. Also it works as a reminder for you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;my-notebook&lt;/strong&gt; is a web application that is used to keep your notes securly. Each user can create, edit and delete its own notes. It also authenticates the user before performing any CRUD operations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Submission Category: Prime Time
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Link to Code
&lt;/h3&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/mohitm15"&gt;
        mohitm15
      &lt;/a&gt; / &lt;a href="https://github.com/mohitm15/my-notebook"&gt;
        my-notebook
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      my-notebook is a web application that is used to keep your notes securely. 
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;br&gt;

&lt;h3&gt;
my-notebook&lt;/h3&gt;
  &lt;p&gt;
    Handy tool to make your notes
    &lt;br&gt;
    &lt;a href="https://github.com/mohitm15/my-notebook"&gt;&lt;strong&gt;Explore the docs »&lt;/strong&gt;&lt;/a&gt;
    &lt;br&gt;
    &lt;br&gt;
    &lt;a href="https://github.com/github_username/repo_name"&gt;View Demo&lt;/a&gt;
  &lt;/p&gt;

  &lt;h2&gt;
Table of Contents&lt;/h2&gt;
  &lt;ol&gt;
    &lt;li&gt;
      &lt;a href="https://github.com/mohitm15/my-notebook#about-the-project"&gt;About The Project&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href="https://github.com/mohitm15/my-notebook#built-with"&gt;Built With&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;a href="https://github.com/mohitm15/my-notebook#getting-started"&gt;Getting Started&lt;/a&gt;
      &lt;ul&gt;
        &lt;li&gt;&lt;a href="https://github.com/mohitm15/my-notebook#prerequisites"&gt;Prerequisites&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href="https://github.com/mohitm15/my-notebook#installation"&gt;Installation&lt;/a&gt;&lt;/li&gt;
       &lt;li&gt;&lt;a href="https://github.com/mohitm15/my-notebook#runningcode"&gt;Running the code&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;&lt;a href="https://github.com/mohitm15/my-notebook#rpreview"&gt;Preview&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://github.com/mohitm15/my-notebook#contributing"&gt;Contributing&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://github.com/mohitm15/my-notebook#contact"&gt;Contact&lt;/a&gt;&lt;/li&gt;
  &lt;/ol&gt;

&lt;h2&gt;
About The Project&lt;/h2&gt;
&lt;p&gt;my-notebook is a web application that is used to keep your notes securly. Each user can create, edit and delete its own notes. It also authenticates the user before performing any CRUD operation.&lt;/p&gt;
&lt;h3&gt;
Built With&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://nodejs.org/en/" rel="nofollow"&gt;NodeJS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://reactjs.org/" rel="nofollow"&gt;ReactJS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://expressjs.com/" rel="nofollow"&gt;ExpressJS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.mongodb.com/" rel="nofollow"&gt;MongoDB&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
Getting Started&lt;/h2&gt;
&lt;p&gt;To get a local copy up and running follow these simple steps.&lt;/p&gt;
&lt;h3&gt;
Prerequisites&lt;/h3&gt;
&lt;p&gt;Package.json file mentioned the requirements you need to use the software and how to install them.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;npm&lt;/p&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;npm install npm@latest -g&lt;/pre&gt;

&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Any code editor of your choice (VScode preferable )&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Installation&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Clone the repo
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;git clone https://github.com/mohitm15/my-notebook.git&lt;/pre&gt;

&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;Install NPM packages and requirements
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;npm install&lt;/pre&gt;

&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
Running the code&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To run the frontend server , go to terminal and run&lt;/p&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;    &lt;span class="pl-c1"&gt;cd&lt;/span&gt; frontend&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;and then&lt;/p&gt;
&lt;div class="highlight highlight-source-shell position-relative overflow-auto js-code-highlight"&gt;…
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/mohitm15/my-notebook"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Additional Resources / Info
&lt;/h3&gt;

&lt;p&gt;[Note:] # (Be sure to link to any open source projects that are using your workflow!)&lt;/p&gt;

&lt;h4&gt;
  
  
  Technologies Used :
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;FrontEnd :&lt;/strong&gt; ReactJS &amp;amp; Framer Motion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend :&lt;/strong&gt; ExpressJS &amp;amp; NodeJS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DataBase :&lt;/strong&gt; MongoDB&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  ScreenShots
&lt;/h4&gt;

&lt;p&gt;[Note:] # Screenshots/demo videos are encouraged!&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;em&gt;SignUp Page&lt;/em&gt;
&lt;/h4&gt;

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

&lt;h4&gt;
  
  
  &lt;em&gt;Login Page&lt;/em&gt;
&lt;/h4&gt;

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

&lt;h4&gt;
  
  
  &lt;em&gt;Home Page&lt;/em&gt;
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Theme : &lt;strong&gt;Dark&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Theme : &lt;strong&gt;High Contrast&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Theme : &lt;strong&gt;Dark Teal&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Theme : &lt;strong&gt;Rainbow&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h4&gt;
  
  
  Demo video
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://kapwi.ng/c/VdweXzAmR-"&gt;video&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PS: Project is built and hosted with MongoDB ecosystem and ❤️&lt;/p&gt;

</description>
      <category>atlashackathon</category>
      <category>mongodb</category>
      <category>react</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Creating Super Radio Buttons</title>
      <dc:creator>Mohit Maroliya</dc:creator>
      <pubDate>Fri, 31 Dec 2021 14:31:36 +0000</pubDate>
      <link>https://dev.to/mohitm15/creating-super-radio-buttons-ip8</link>
      <guid>https://dev.to/mohitm15/creating-super-radio-buttons-ip8</guid>
      <description>&lt;p&gt;In the last &lt;a href="https://dev.to/mohitm15/creating-super-buttons-for-like-share-and-subscribe-gef"&gt;post&lt;/a&gt; , I had shared to create &lt;strong&gt;SuperLike, SuperShare and SuperSubscribe&lt;/strong&gt; buttons.&lt;/p&gt;

&lt;p&gt;In this post,  I will show how to create a cool &lt;code&gt;html-css radio button&lt;/code&gt; that represents the feeling of animated &lt;code&gt;radio-button&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For this we require a html file &lt;code&gt;index.html&lt;/code&gt;and a css file &lt;code&gt;style.css&lt;/code&gt;only.&lt;/p&gt;

&lt;p&gt;The end result for Radio-button is like this:&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/SuperRadioButton-5nru1"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up the input structure
&lt;/h2&gt;

&lt;p&gt;Lets get started by setting up the basic structure in &lt;code&gt;index.html&lt;/code&gt; file. We had used &lt;code&gt;&amp;lt;input/&amp;gt;&lt;/code&gt; of type &lt;code&gt;radio&lt;/code&gt; here which we wrap in &lt;code&gt;main_wrapper&lt;/code&gt; class.&lt;/p&gt;

&lt;p&gt;So for our &lt;code&gt;index.html&lt;/code&gt; file, all we need is the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;body&amp;gt;
    &amp;lt;div class="main_wrapper"&amp;gt;
      &amp;lt;div class="buttons_wrapper"&amp;gt;

        &amp;lt;input type="radio" id="radio1" name="inputs" /&amp;gt;
        &amp;lt;label class="entry" for="radio1"&amp;gt;
          &amp;lt;div class="circle"&amp;gt;&amp;lt;/div&amp;gt;
          &amp;lt;div class="entry-label"&amp;gt;Yes&amp;lt;/div&amp;gt;
        &amp;lt;/label&amp;gt;

        &amp;lt;input type="radio" id="radio2" name="inputs" /&amp;gt;
        &amp;lt;label class="entry" for="radio2"&amp;gt;
          &amp;lt;div class="circle"&amp;gt;&amp;lt;/div&amp;gt;
          &amp;lt;div class="entry-label"&amp;gt;No&amp;lt;/div&amp;gt;
        &amp;lt;/label&amp;gt;

        &amp;lt;input type="radio" id="radio3" name="inputs" /&amp;gt;
        &amp;lt;label class="entry" for="radio3"&amp;gt;
          &amp;lt;div class="circle"&amp;gt;&amp;lt;/div&amp;gt;
          &amp;lt;div class="entry-label"&amp;gt;May Be&amp;lt;/div&amp;gt;
        &amp;lt;/label&amp;gt;

        &amp;lt;div class="highlight"&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since, we have defined the &lt;code&gt;ids&lt;/code&gt; and &lt;code&gt;classes&lt;/code&gt; for the html components, so now its time to add some styling and animations to them. 😄&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding the Styles
&lt;/h2&gt;

&lt;p&gt;We first add styling to &lt;code&gt;main_wrapper&lt;/code&gt; and &lt;code&gt;buttons_wrapper&lt;/code&gt; classes, label of radioButton and the circle in front of each option.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Outfit", sans-serif;
  font-size: 28px;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f7f7f7;
  color: #cacaca;
}

.main_wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  width: 260px;
  padding: 50px;
  box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.82);
  border-radius: 20px;
  position: relative;
}

.buttons_wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: auto;
  width: 160px;
  overflow: hidden;
  position: relative;
}

.entry {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  margin: 10px;
  width: 100%;
  position: relative;
  transition: 0.5s;
}

.circle {
  height: 32px;
  width: 32px;
  top: 50%;
  border: 3px solid #cacaca;
  border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.5s;
}

.entry-label {
  font-weight: 700;
  padding-left: 15px;
  cursor: pointer;
  user-select: none;
  -moz-user-select: none;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: I have used the &lt;code&gt;Outfit&lt;/code&gt; &lt;strong&gt;Google Font&lt;/strong&gt;. You can import the font by writing the following code on top of the CSS file. &lt;br&gt;
&lt;code&gt;@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@200&amp;amp;display=swap");&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now I will add some styling to the &lt;code&gt;highlight&lt;/code&gt; class that will appear when an input is selected.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.highlight {
  height: 18px;
  width: 18px;
  top: 19px;
  left: 7px;
  position: absolute;
  border-radius: 59%;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: translateY(-55px);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally add the styling and animation to the &lt;code&gt;input&lt;/code&gt; options&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input {
  display: none;
}

input:nth-child(1):checked ~ .highlight {
  transform: translateY(0);
  background: green;
}

input:nth-child(3):checked ~ .highlight {
  transform: translateY(55px);
  background:red;
}

input:nth-child(5):checked ~ .highlight {
  transform: translateY(110px);
  background: blue;
}
input:nth-child(1):checked + .entry .circle {
  border-color: #056b16;
  color: #056b16;
}
input:nth-child(3):checked + .entry .circle {
  border-color: rgb(160, 2, 2);
  color: rgb(160, 2, 2);
}
input:nth-child(5):checked + .entry .circle {
  border-color: rgb(0, 0, 185);
  color: rgb(0, 0, 185);
}
input:nth-child(1):checked + .entry {
  color: #056b16;
}
input:nth-child(3):checked + .entry {
  color: rgb(160, 2, 2);
}
input:nth-child(5):checked + .entry {
  color: rgb(0, 0, 185);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Cheers! 🍻, you have build the &lt;code&gt;SuperRadio&lt;/code&gt; button.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/SuperRadioButton-5nru1"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Now you can come up with as many stylings and make this small application more fantastic.&lt;/p&gt;

&lt;p&gt;Thank you for your time. Please share your valuable feedbacks in comments also.&lt;/p&gt;

&lt;p&gt;☘️ Happy Coding &amp;amp; Happy New Year 2k22 ☘️&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>html</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Creating Super Buttons for Like, Share and Subscribe</title>
      <dc:creator>Mohit Maroliya</dc:creator>
      <pubDate>Tue, 07 Dec 2021 12:46:59 +0000</pubDate>
      <link>https://dev.to/mohitm15/creating-super-buttons-for-like-share-and-subscribe-gef</link>
      <guid>https://dev.to/mohitm15/creating-super-buttons-for-like-share-and-subscribe-gef</guid>
      <description>&lt;p&gt;Whenever you watches any YouTube video, I'm sure you have come across the terms &lt;code&gt;Like&lt;/code&gt;, &lt;code&gt;Share&lt;/code&gt; and &lt;code&gt;Subscribe&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I wanted to create a cool &lt;code&gt;html-css&lt;/code&gt; button that represents the feeling of Like-Share-Subscribe.&lt;/p&gt;

&lt;p&gt;For this we require a html file &lt;code&gt;index.html&lt;/code&gt;, css file &lt;code&gt;style.css&lt;/code&gt; and javaScript file &lt;code&gt;index.js&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The end result for &lt;code&gt;Like&lt;/code&gt; button is like this:&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/fill-heart-ldp1v"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up the input structure
&lt;/h2&gt;

&lt;p&gt;Lets get started by setting up the basic structure. We had used &lt;code&gt;&amp;lt;input/&amp;gt;&lt;/code&gt; of type &lt;code&gt;checkbox&lt;/code&gt; here which is also known as &lt;code&gt;toggle&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So for our &lt;code&gt;index.html&lt;/code&gt; file, all we need is the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;body&amp;gt;
    &amp;lt;label id="Likebtn" for="myBtn" class="star-button" onclick="fillheart()"&amp;gt;
      &amp;lt;input type="checkbox" id="myBtn" /&amp;gt;
      &amp;lt;div class="heart"&amp;gt;
        &amp;lt;i id="un-filled-heart" class="far fa-heart"&amp;gt;&amp;lt;/i&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="btn-text"&amp;gt;
        &amp;lt;span&amp;gt;Like&amp;lt;/span&amp;gt;
        &amp;lt;span&amp;gt;Liked&amp;lt;/span&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="active-heart"&amp;gt;
        &amp;lt;i class="fas fa-heart"&amp;gt;&amp;lt;/i&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/label&amp;gt;
    &amp;lt;br /&amp;gt;
    &amp;lt;script src="src/index.js" type="text/javascript"&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: just define the fillheart() function with a console.log statement as of now in &lt;code&gt;index.js&lt;/code&gt; or under &lt;code&gt;script&lt;/code&gt; tag.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Since, we have defined the &lt;code&gt;ids&lt;/code&gt; and &lt;code&gt;classes&lt;/code&gt; for the html components, so now its time to add some styling and animations to them. 😄&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding the Styles
&lt;/h2&gt;

&lt;p&gt;We first add styling to input checkbox, label (&lt;em&gt;star-button&lt;/em&gt;) and the icon.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: I have used the &lt;code&gt;cdn&lt;/code&gt; link of &lt;strong&gt;FontAwesome&lt;/strong&gt; to use the icons. Check &lt;a href="https://fontawesome.com/v5.15/how-to-use/customizing-wordpress/snippets/setup-cdn-webfont"&gt;here&lt;/a&gt; for the cdn link.&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  height: 50vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgb(218, 216, 216);
}

input {
  display: none;
}

.star-button {
  position: relative;
  width: 250px;
  height: 85px;
  margin-top: 70px;
  border-radius: 15px;
  cursor: pointer;
  background: rgb(255, 255, 255);
  z-index: 2;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.096);
}

.heart {
  position: absolute;
  left: 15%;
  top: 55%;
  font-size: 45px;
  transform: translateY(-50%);
  color: rgb(196, 196, 196);
  z-index: 1;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we add some styling to the text over the button and on the span component of it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.btn-text {
  position: absolute;
  left: 50%;
  width: 130px;
  height: 100%;
  background: rgb(228, 51, 66);
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
  overflow-x: hidden;
}

.btn-text span{
  color: rgb(255, 255, 255);
  transform: translateX(55%);
  font-size: 35px;
  padding: 20px;
  font-family: "sans-serif";
  transition: 0.2s;
  user-select: none;
}

.active-heart {
  position: absolute;
  right: 15%;
  top: 20%;
  font-size: 50px;
  z-index: -1;
  color: rgb(219, 219, 219);
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we add the styling to all the corresponding components when the &lt;em&gt;input checkbox is checked.&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input:checked + .heart {
  animation: move 0.7s ease-in forwards;
  color: rgb(228, 51, 66);
}

input:checked ~ .active-heart {
  color: rgb(228, 51, 66);
  transition-delay: 0.7s;
  animation: shake 0.8s 0.2s forwards;
  animation-delay: 0.7s;
}

input:checked ~ .btn-text span {
  transform: translateX(-45%);
  transition-delay: 0.7s;
}

input:checked ~ .btn-text {
  left: 0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above code, you observed that we have used two types of animation named &lt;code&gt;move&lt;/code&gt; and &lt;code&gt;shake&lt;/code&gt; for the icon heart. So now we define the above-mentioned animation using &lt;a href="https://www.w3schools.com/cssref/css3_pr_animation-keyframes.asp"&gt;keyframes&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  move animation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@keyframes move {
  10% {
    transform: translateX(-330%) scale(1.2);
    left: 20%;
    opacity: 1;
  }
  30% {
    transform: translateY(150%);
  }
  50% {
    transform: translateX(300%);
    opacity: 1;
  }
  75% {
    transform: translateY(200%);
    left: 65%;
    opacity: 1;
  }
  85% {
    left: 70%;
  }
  100% {
    transform: translateY(-600%);
    left: 70%;
    opacity: 0;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  shake animation
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@keyframes shake {
  0% {
    transform: scale3d(1, 1, 1);
    text-shadow: 0 0 3px #ff0000, 0 0 5px #0000ff;
  }
  30% {
    transform: scale3d(1.25, 0.75, 1);
    text-shadow: 0 0 3px #ff0000, 0 0 5px #0000ff;
  }
  40% {
    transform: scale3d(0.75, 1.25, 1);
    text-shadow: 0 0 3px #ff0000, 0 0 5px #0000ff;
  }
  50% {
    transform: scale3d(1.15, 0.85, 1);
    text-shadow: 0 0 3px #ff0000, 0 0 5px #0000ff;
  }
  65% {
    transform: scale3d(0.95, 1.05, 1);
    text-shadow: 0 0 2px #ff0000, 0 0 5px #0000ffb7;
  }
  75% {
    transform: scale3d(1.05, 0.95, 1);
    text-shadow: 0 0 1px #ff0000, 0 0 5px #0000ff83;
  }
  100% {
    transform: scale3d(1, 1, 1);
    text-shadow: 0 0 1px rgb(153, 151, 151), 0 0 5px rgb(174, 174, 179);
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we only left to add javascript.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding JavaScript Logic
&lt;/h2&gt;

&lt;p&gt;Either create a seperate &lt;code&gt;index.js&lt;/code&gt; file or write within &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; in index.html .&lt;/p&gt;

&lt;p&gt;Add the following code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    let myBtn = document.getElementById("myBtn");

    function fillheart() {
      if (myBtn.checked === 1) {
        document
          .getElementById("un-filled-heart")
          .setAttribute("class", "fas fa-heart");
      } else {
        document
          .getElementById("un-filled-heart")
          .setAttribute("class", "far fa-heart");
      }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Cheers! 🍻, you have build the &lt;code&gt;SuperLike&lt;/code&gt; button. &lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/fill-heart-ldp1v"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Now you can come up with as many stylings to this small application. You can take up some challenges by making &lt;code&gt;SuperShare&lt;/code&gt; and &lt;code&gt;SuperSubcribe&lt;/code&gt; button as given below. &lt;/p&gt;

&lt;h3&gt;
  
  
  SuperShare
&lt;/h3&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/delicate-feather-bvu7b"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  SuperSubscribe
&lt;/h3&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/subscribe-button-roukv"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Thank you for your time. Since this is my second post, please share your valuable feedback in comments also.&lt;/p&gt;

&lt;p&gt;Happy Coding ! ☘️&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>html</category>
      <category>css</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Starting with React-Redux</title>
      <dc:creator>Mohit Maroliya</dc:creator>
      <pubDate>Sun, 21 Nov 2021 14:45:55 +0000</pubDate>
      <link>https://dev.to/mohitm15/starting-with-react-redux-1dno</link>
      <guid>https://dev.to/mohitm15/starting-with-react-redux-1dno</guid>
      <description>&lt;p&gt;Hello everyone, this is my first post on &lt;strong&gt;Dev.to&lt;/strong&gt;. In this post, I am trying to explain the use of &lt;strong&gt;Redux&lt;/strong&gt; in ReactJS with an example. Here, I have taken some references from YouTube and Google for information. I will first explain to you the need for &lt;strong&gt;Redux&lt;/strong&gt; and explain it with the code. For reference, you can check out Github to view the code anytime.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://redux-starter-boilerplate.herokuapp.com/" rel="noopener noreferrer"&gt;View Live Demo&lt;/a&gt;            &lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/mohitm15/redux-boilerplate/tree/master/redux-boilerplate" rel="noopener noreferrer"&gt;View on Github&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we need Redux ?
&lt;/h2&gt;

&lt;p&gt;When a JavaScript Application grows big, it becomes difficult to manage its &lt;strong&gt;state&lt;/strong&gt;. For example, in the given architecture, if I want to use the state defined in Child_C of the Contact.js in the Child_B of the Home.js, then I had to do &lt;strong&gt;prop-drilling&lt;/strong&gt;, where I have to pass the &lt;strong&gt;state&lt;/strong&gt; as props over various components.&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%2F2ugzngpwex7cxfc74n40.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%2F2ugzngpwex7cxfc74n40.png" alt="Prop-drilling in ReactJS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But Redux solves this problem by managing the application's state with the help of a single global object called &lt;code&gt;Store.&lt;/code&gt; This provides consistency to the application and makes testing easy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Redux -Architecture
&lt;/h2&gt;

&lt;p&gt;The Architecture consists of &lt;strong&gt;4 components&lt;/strong&gt; mainly - &lt;code&gt;Action, Reducer, Store and View&lt;/code&gt;. And believe me, they work in the same way as their name suggests.&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%2Frm42cl1lpmqwjlya0qn0.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%2Frm42cl1lpmqwjlya0qn0.png" alt="Redux Architecture"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Action is a plain object that describes the intention to cause change, like adding or deleting a task in a To-do-List app.&lt;/li&gt;
&lt;li&gt;Reducer is a function that determines changes to an application state. Like in the To-do-List app, action will trigger a change in the value of state &lt;code&gt;task_Array&lt;/code&gt; that the reducer will determine. It returns the new state and tells the store how to do it. Simply, it uses the action it receives to determine the change.&lt;/li&gt;
&lt;li&gt;Store projects all the state variables to the view, which is the UI of the application.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, let's make our hands dirty and start coding with an example to understand &lt;strong&gt;Redux&lt;/strong&gt; more deeply. I will tell you the concept and later, you can start with your stuff to do with it. Also, I have added some tasks for deep understanding in the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example - Redux Boilerplate.
&lt;/h2&gt;

&lt;p&gt;Here we try &lt;strong&gt;to create a webApp where we define the states in different components and perform onclick events from different components. The states we define are the &lt;code&gt;countValue&lt;/code&gt; and &lt;code&gt;darkMode&lt;/code&gt; enabling.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you directly want to see the whole code, you can view it on Github. 🤠&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/mohitm15/redux-boilerplate/tree/master/redux-boilerplate" rel="noopener noreferrer"&gt;View on Github&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Setting Up React App
&lt;/h3&gt;

&lt;p&gt;Create a folder in your desktop named &lt;code&gt;redux-boilerplate&lt;/code&gt; and open it in the &lt;strong&gt;VSCode&lt;/strong&gt;. Now, open the terminal and create the react app.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx create-react-app redux-boilerplate&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: You’ll need to have Node &amp;gt;= 14.0.0 and npm &amp;gt;= 5.6 on your machine.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now add the Bootstrap by using the CDN link of CSS (&lt;a href="https://getbootstrap.com/docs/5.1/getting-started/introduction/#css" rel="noopener noreferrer"&gt;here&lt;/a&gt;) and script link (&lt;a href="https://getbootstrap.com/docs/5.1/getting-started/introduction/#js" rel="noopener noreferrer"&gt;here&lt;/a&gt;) .&lt;/p&gt;

&lt;p&gt;If you are new , just simply copy the &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;script&amp;gt;&lt;/code&gt; from both the links and paste it to the &lt;strong&gt;public&amp;gt;&amp;gt;index.html&lt;/strong&gt; file at appropriate place.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;ProTip:&lt;/strong&gt;To check bootstrap added successfully, just simply paste the code to &lt;code&gt;App.js&lt;/code&gt; file and see red colored font.&lt;/p&gt;


&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import './App.css';
function App() {
  return (
    &amp;lt;&amp;gt;
      &amp;lt;h1 className="text-danger"&amp;gt; Hello World!&amp;lt;/h1&amp;gt;
    &amp;lt;/&amp;gt;
  );
}
export default App;
&lt;/code&gt;&lt;/pre&gt;

&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  2. Creating NavBar and Shop Component
&lt;/h2&gt;

&lt;p&gt;Create a folder &lt;strong&gt;components&lt;/strong&gt; in &lt;code&gt;src&lt;/code&gt; folder. Now create a file &lt;code&gt;Navbar.js&lt;/code&gt; &amp;amp; another file &lt;code&gt;Shop.js&lt;/code&gt; both in components folder.&lt;/p&gt;

&lt;h4&gt;
  
  
  NavBar.js
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from "react";

const Navbar = () =&amp;gt; {

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;nav className="navbar navbar-expand-lg navbar-dark bg-dark"&amp;gt;
        &amp;lt;div className="container-fluid"&amp;gt;
          &amp;lt;a className="navbar-brand" href="/"&amp;gt;
            Redux BoilerPlate
          &amp;lt;/a&amp;gt;
          &amp;lt;button
            className="navbar-toggler"
            type="button"
            data-bs-toggle="collapse"
            data-bs-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent"
            aria-expanded="false"
            aria-label="Toggle navigation"
          &amp;gt;
            &amp;lt;span className="navbar-toggler-icon"&amp;gt;&amp;lt;/span&amp;gt;
          &amp;lt;/button&amp;gt;
          &amp;lt;div className="collapse navbar-collapse" id="navbarSupportedContent"&amp;gt;
            &amp;lt;ul className="navbar-nav me-auto mb-2 mb-lg-0"&amp;gt;
              &amp;lt;li className="nav-item"&amp;gt;
                &amp;lt;a className="nav-link active" aria-current="page" href="/"&amp;gt;
                  Home
                &amp;lt;/a&amp;gt;
              &amp;lt;/li&amp;gt;
              &amp;lt;li className="nav-item"&amp;gt;
                &amp;lt;a className="nav-link" href="/about"&amp;gt;
                  About
                &amp;lt;/a&amp;gt;
              &amp;lt;/li&amp;gt;
            &amp;lt;/ul&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div&amp;gt;

                &amp;lt;div className="form-check form-switch mx-4"&amp;gt;
                  &amp;lt;input className="form-check-input" type="checkbox" id="flexSwitchCheckDefault" /&amp;gt;
                  &amp;lt;label className="form-check-label text-light" htmlFor="flexSwitchCheckDefault"&amp;gt;Darkmode&amp;lt;/label&amp;gt;
                &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
          &amp;lt;div&amp;gt;
            &amp;lt;button className="btn btn-info mx-1"&amp;gt;CountValue : 0 &amp;lt;/button&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/nav&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};

export default Navbar;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Shop.js
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react';

const Shop = () =&amp;gt; {

    return (
        &amp;lt;&amp;gt;
        &amp;lt;div className="container p-3"&amp;gt; 
        &amp;lt;div className={`alert alert-success` } role="alert"&amp;gt;
            &amp;lt;h2&amp;gt;Redux BoilerPlate&amp;lt;/h2&amp;gt;
        &amp;lt;/div&amp;gt;
            &amp;lt;h3 className="my-5"&amp;gt;Simple Starter template for redux-store&amp;lt;/h3&amp;gt;

            &amp;lt;div className="container my-5"&amp;gt;
                &amp;lt;h1 className="display-1"&amp;gt;This is LightMode&amp;lt;/h1&amp;gt;
            &amp;lt;/div&amp;gt;

            &amp;lt;div className="container d-flex"&amp;gt;
                &amp;lt;button className="btn-lg btn-success mx-4" &amp;gt; + &amp;lt;/button&amp;gt;
                    &amp;lt;h1 className="display-6"&amp;gt;You Count Value = 0 &amp;lt;/h1&amp;gt;
                &amp;lt;button className="btn-lg btn-danger mx-4" &amp;gt; - &amp;lt;/button&amp;gt;
            &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;/&amp;gt;
    )
}

export default Shop;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste the above code in &lt;strong&gt;Navbar.js&lt;/strong&gt; &amp;amp; &lt;strong&gt;Shop.js&lt;/strong&gt; respectively .Add the components in &lt;strong&gt;App.js&lt;/strong&gt; using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import Navbar from './components/Navbar';
import Shop from './components/Shop';
.
.
.
  return (
    &amp;lt;&amp;gt;
      &amp;lt;Navbar /&amp;gt;
       &amp;lt;div className="container p-3"&amp;gt;
        &amp;lt;Shop /&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will show the navbar at top and Shop component on screen.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Installing Redux
&lt;/h3&gt;

&lt;p&gt;To install the redux , just open a new tab in terminal and run &lt;br&gt;
          &lt;code&gt;npm i redux&lt;/code&gt;&lt;br&gt;
          &lt;code&gt;npm i react-redux&lt;/code&gt;&lt;br&gt;
          &lt;code&gt;npm i redux-thunk&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Get more info &lt;a href="https://www.npmjs.com/package/redux" rel="noopener noreferrer"&gt;here&lt;/a&gt; .&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  4. Creating Action-Creator and Reducers
&lt;/h3&gt;

&lt;p&gt;Now we'll create action-creators and reducers function which will change the &lt;code&gt;countValue&lt;/code&gt; and enable &lt;code&gt;darkMode&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;As discussed, action-creators create the action to change the state variable and reducer is a pure function that takes action &amp;amp; the previous state of the application and returns the new state.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Action consists of &lt;em&gt;type&lt;/em&gt; and &lt;em&gt;payload&lt;/em&gt; to be supplied to Reducer function. The type defines the action-type and the payload defines the value to be substituted with the previous one.&lt;/p&gt;

&lt;p&gt;To do this, we will create a folder name &lt;code&gt;state&lt;/code&gt; inside the &lt;code&gt;src&lt;/code&gt; folder. Inside the &lt;code&gt;src&lt;/code&gt; folder, we create two more folders :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;action-creators&lt;/li&gt;
&lt;li&gt;reducer&lt;/li&gt;
&lt;/ul&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%2F39n9pch22sbsmfjn9625.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%2F39n9pch22sbsmfjn9625.png" alt="directory structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we create &lt;code&gt;index.js&lt;/code&gt; file in &lt;code&gt;action-creators&lt;/code&gt; folder and write code for action-creator. We will create action here.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const increaseCount = (countValue) =&amp;gt; {
    return (dispatch) =&amp;gt; {
        dispatch ({
            type: 'increase',
            payload: countValue
        })
    }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;strong&gt;increaseCount&lt;/strong&gt; is a function that returns a function named &lt;code&gt;dispatch&lt;/code&gt; which dispatches type &amp;amp; payload.  &lt;/p&gt;

&lt;p&gt;Try to write action-creators for &lt;code&gt;decreaseCount&lt;/code&gt;, &lt;code&gt;enableDarkMode&lt;/code&gt; and &lt;code&gt;enableLightMode&lt;/code&gt; in the same file.&lt;/p&gt;

&lt;p&gt;You can compare your code with the full code of &lt;code&gt;state/action-creators/index.js&lt;/code&gt; from &lt;a href="https://github.com/mohitm15/redux-boilerplate/blob/master/redux-boilerplate/src/state/action-creators/index.js" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now we make &lt;code&gt;Reducers&lt;/code&gt;. Reducers need not to be a single one, for the different states, we have different reducers. Like here, we'll create two reducers file named &lt;code&gt;countReducer.js&lt;/code&gt; and &lt;code&gt;darkmodeReducer.js&lt;/code&gt; inside &lt;code&gt;reducer&lt;/code&gt; folder, which will look after the &lt;code&gt;countValue&lt;/code&gt; and &lt;code&gt;darkMode&lt;/code&gt; state variables.&lt;/p&gt;

&lt;p&gt;Let's create &lt;code&gt;countReducer.js&lt;/code&gt; to change the count value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const reducer = (state=0, action) =&amp;gt; {
    if(action.type === 'increase') {
        return state +  action.payload;
    }
    else if(action.type === 'decrease') {
        return state - action.payload
    }
    else {
        return state;
    }

}

export default reducer;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see above, it takes the state variable and action from the action creator as a parameter and returns the modified state with the help of the action payload.&lt;/p&gt;

&lt;p&gt;Try to create &lt;code&gt;darkModeReducer.js&lt;/code&gt; by own first and compare your results from below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const reducer = (state= 'OFF', action) =&amp;gt; {
    if(action.type === 'darkmode') {
        state = action.payload;
    }
    else if(action.type === 'lightmode') {
        state = action.payload;
    }
    return state;
}

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

&lt;/div&gt;



&lt;h4&gt;
  
  
  Bonus
&lt;/h4&gt;

&lt;p&gt;Since for large complex applications, we know that we require many reducers and handling them individually is a messy task. So redux provides us &lt;a href="https://redux.js.org/api/combinereducers" rel="noopener noreferrer"&gt;&lt;code&gt;combineReducers&lt;/code&gt;&lt;/a&gt;, which combines all the reducer functions and export them as a single reducer function.&lt;/p&gt;

&lt;p&gt;For this, create a file &lt;code&gt;index.js&lt;/code&gt; in &lt;code&gt;reducer&lt;/code&gt; folder and paste the below code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { combineReducers } from "redux";
import countValueReducer from './countReducer';
import darkmodeReducer from './darkmodeReducer';

//combinnig all the reducers here
const reducer = combineReducers({
    countValue: countValueReducer,
    darkmode: darkmodeReducer
})

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Creating Store
&lt;/h3&gt;

&lt;p&gt;To recall, a store is a global place where all the things defined is exposed to all the application. Simply, every part of the application gets access to the store.&lt;/p&gt;

&lt;p&gt;Here, we will create a file &lt;code&gt;store.js&lt;/code&gt; inside the &lt;code&gt;state&lt;/code&gt; directory. Use to code below for &lt;code&gt;store.js&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { applyMiddleware, createStore } from "redux";
import thunk from "redux-thunk";
import reducer from "./reducer";

export const store = createStore(reducer,{}, applyMiddleware(thunk));

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You have seen many new things here, let's understand them one by one.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://redux.js.org/api/createstore" rel="noopener noreferrer"&gt;createStore&lt;/a&gt;&lt;/strong&gt; : It takes the reducers, preloaded state and enhancer function(optional) to create the store. It returns an object that holds the complete state of your app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://redux.js.org/api/applymiddleware" rel="noopener noreferrer"&gt;applyMiddleware&lt;/a&gt;&lt;/strong&gt; : Returns a store enhancer that applies the given middleware.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/reduxjs/redux-thunk#readme" rel="noopener noreferrer"&gt;redux-thunk&lt;/a&gt;&lt;/strong&gt;: Helps to execute asynchronous functions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hurray! store is created. ✨&lt;/p&gt;

&lt;p&gt;Now I want to give access of store to the overall application. So we go to the file &lt;code&gt;src/index.js&lt;/code&gt; (main index.js file) and import the store here. The file will look like&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 from 'react';
.
.
.
import { Provider } from 'react-redux';
import { store } from './state/store';

ReactDOM.render(
 .
 .
    &amp;lt;Provider store={store}&amp;gt;
    &amp;lt;App /&amp;gt;
    &amp;lt;/Provider&amp;gt;
 .
 .
);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;See complete file &lt;a href="https://github.com/mohitm15/redux-boilerplate/blob/master/redux-boilerplate/src/index.js" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Also we create a file &lt;code&gt;index.js&lt;/code&gt; inside &lt;code&gt;state&lt;/code&gt; directory.&lt;br&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%2Fxcgi898gvhcwvrczu0mp.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%2Fxcgi898gvhcwvrczu0mp.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will increase the accessbility of action-creators as we export all the action-creators from here to all the components like &lt;em&gt;Navbar.js&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export * as actionCreators from './action-creators/index';

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. Second Last Step
&lt;/h3&gt;

&lt;p&gt;As far as now, we have not added any function to the &lt;code&gt;+&lt;/code&gt;/ &lt;code&gt;-&lt;/code&gt; button and &lt;code&gt;darkmode&lt;/code&gt; toggle, but now we got access to the state variables through store, we can use them to display their values on the UI.&lt;/p&gt;

&lt;p&gt;To access the state, we use &lt;a href="https://react-redux.js.org/api/hooks#useselector" rel="noopener noreferrer"&gt;&lt;code&gt;useSelector&lt;/code&gt;&lt;/a&gt; hook. In the &lt;code&gt;navbar.js&lt;/code&gt; file we import the hook first using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useSelector } from "react-redux";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then use it as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.
.
 const countValue = useSelector((state) =&amp;gt; state.countValue);
 const darkmode = useSelector((state) =&amp;gt; state.darkmode);
.
.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And change the value of countValue from &lt;code&gt;0 to {countValue}&lt;/code&gt;, like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button className="btn btn-info mx-1"&amp;gt;CountValue : {countValue}&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So far we have use the countValue state, we also need to use &lt;code&gt;darkMode&lt;/code&gt; state in &lt;code&gt;App.js&lt;/code&gt; and &lt;code&gt;Shop.js&lt;/code&gt;.&lt;/p&gt;

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



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useSelector } from "react-redux";
import './App.css';
import Navbar from './components/Navbar';
import Shop from './components/Shop';

function App() {

const darkmode = useSelector(state =&amp;gt; state.darkmode);

let darkmodeStyle = {
        backgroundColor:'#2d2d2d',
        color:'whitesmoke'
    }

  return (
    &amp;lt;&amp;gt;
      &amp;lt;Navbar /&amp;gt;
      &amp;lt;div className="container p-3" style={darkmodeStyle}&amp;gt;
        &amp;lt;Shop /&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/&amp;gt;
  );
}

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

&lt;/div&gt;



&lt;p&gt;In &lt;code&gt;shop.js&lt;/code&gt;, just simply import the &lt;code&gt;useSelector&lt;/code&gt; hook like in &lt;code&gt;Navbar.js&lt;/code&gt; using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useSelector } from "react-redux";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then use it as inside &lt;code&gt;Shop&lt;/code&gt; component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.
.
 const darkmode = useSelector((state) =&amp;gt; state.darkmode);
.
.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  7. Last Step
&lt;/h3&gt;

&lt;p&gt;Now we have access to the variables that we use to bring the changes on view.&lt;/p&gt;

&lt;p&gt;Here, state values will be first changed by the user from the front-end. Then, we need to generate those actions, which triggers reducer functions and finally alter the values of the state on view.&lt;/p&gt;

&lt;p&gt;To do this we use &lt;a href="https://react-redux.js.org/api/hooks#usedispatch" rel="noopener noreferrer"&gt;&lt;code&gt;useDispatch&lt;/code&gt;&lt;/a&gt; hook, which dispatches the action-creators and &lt;a href="https://redux.js.org/api/bindactioncreators" rel="noopener noreferrer"&gt;&lt;code&gt;bindActionCreators&lt;/code&gt;&lt;/a&gt; to bind all action creators.&lt;/p&gt;

&lt;p&gt;Time to use them!&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;Navbar.js&lt;/code&gt; and &lt;code&gt;Shop.js&lt;/code&gt;, import them as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useSelector, useDispatch } from "react-redux";
import { bindActionCreators } from 'redux';
import { actionCreators } from '../state/index';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And in &lt;code&gt;Navbar.js&lt;/code&gt;, we use &lt;code&gt;enableDarkMode&lt;/code&gt; action-creator to dispatch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const dispatch = useDispatch();//to dispacth the action creator functions
  const {enableDarkMode} = bindActionCreators(actionCreators, dispatch);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will add this &lt;code&gt;darkMode&lt;/code&gt; functionality to &lt;strong&gt;toggle button&lt;/strong&gt; present in navbar like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input className="form-check-input" onClick={()=&amp;gt;{darkmode === 'OFF'?enableDarkMode('ON'):enableDarkMode('OFF')}} type="checkbox" id="flexSwitchCheckDefault" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And add the styling in the &lt;code&gt;App.js&lt;/code&gt; as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.
.

const darkmode = useSelector(state =&amp;gt; state.darkmode);
let darkmodeStyle = {}

if(darkmode === 'ON') {
    darkmodeStyle = {
        backgroundColor:'#2d2d2d',
        color:'whitesmoke'
    }
}

  return (
    &amp;lt;&amp;gt;
.
.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also change a &lt;strong&gt;div&lt;/strong&gt; component in &lt;code&gt;Shop.js&lt;/code&gt; to switch the title on the main page from &lt;code&gt;LightMode&lt;/code&gt; to &lt;code&gt;DarkMode&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Shop.js
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div className="container my-5"&amp;gt;
                &amp;lt;h1 className="display-1"&amp;gt;This is {darkmode === "ON" ? "DarkMode" : "LightMode"}&amp;lt;/h1&amp;gt;
            &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Now you will be able to change background color.&lt;/em&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%2Fd13blemrjcym6o6k69be.gif" 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%2Fd13blemrjcym6o6k69be.gif" alt="darkMode GIF"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To use &lt;code&gt;countValue&lt;/code&gt; action-creator to dispatch,  we need to code in &lt;code&gt;Shop.js&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const dispatch = useDispatch();
const balance = useSelector(state =&amp;gt; state.countValue);
const {increaseCount, decreaseCount} = bindActionCreators(actionCreators,dispatch);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We will add this &lt;code&gt;increaseCount/decreaseCount&lt;/code&gt; functionality to &lt;strong&gt;+ and - buttons&lt;/strong&gt; present in screen like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div className="container d-flex"&amp;gt;
                &amp;lt;button className="btn-lg btn-success mx-4" onClick={()=&amp;gt;(increaseCount(1))}&amp;gt; + &amp;lt;/button&amp;gt;
                    &amp;lt;h1 className="display-6"&amp;gt;You Count Value = {balance} &amp;lt;/h1&amp;gt;
                &amp;lt;button className="btn-lg btn-danger mx-4" onClick={()=&amp;gt;(decreaseCount(1))}&amp;gt; - &amp;lt;/button&amp;gt;
            &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Now you will be able to change the countValue.&lt;/em&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%2Fwr8qd9e8y9qfbrmcz6qm.gif" 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%2Fwr8qd9e8y9qfbrmcz6qm.gif" alt="countValue GIF"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For reference,&lt;br&gt;
Complete Navbar.js file is &lt;a href="https://github.com/mohitm15/redux-boilerplate/blob/master/redux-boilerplate/src/components/Navbar.js" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
Complete Shop.js file is &lt;a href="https://github.com/mohitm15/redux-boilerplate/blob/master/redux-boilerplate/src/components/Shop.js" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
Complete App.js file is &lt;a href="https://github.com/mohitm15/redux-boilerplate/blob/master/redux-boilerplate/src/App.js" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Cheers! 🍻, you have build the basic template for redux. Now you can come up with as many functionalities and components to the application. You can take up some challenges by trying tasks like adding a login page, displaying the profile page, or categorizing the type of users. &lt;/p&gt;

&lt;p&gt;Try to come up with your own ideas and send the PRs over &lt;a href="https://github.com/mohitm15/redux-boilerplate/tree/master/redux-boilerplate" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Thank you for your time. Since this is my first post, please share your valuable feedback in comments also.&lt;/p&gt;

&lt;p&gt;Happy Coding ! ☘️&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
