<?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: Rayan Abid</title>
    <description>The latest articles on DEV Community by Rayan Abid (@rayanabid).</description>
    <link>https://dev.to/rayanabid</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%2F923358%2F9f8b9c16-007d-4922-a80d-25bb6683c18b.jpeg</url>
      <title>DEV Community: Rayan Abid</title>
      <link>https://dev.to/rayanabid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rayanabid"/>
    <language>en</language>
    <item>
      <title>Setup multiple Github accounts on mac. 💻</title>
      <dc:creator>Rayan Abid</dc:creator>
      <pubDate>Tue, 19 Jul 2022 18:48:56 +0000</pubDate>
      <link>https://dev.to/rayanabid/setup-multiple-github-accounts-on-mac-347a</link>
      <guid>https://dev.to/rayanabid/setup-multiple-github-accounts-on-mac-347a</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;So, I was once a happy boy. I just had one Github account, That I could use to do all that git stuff, but then I got hired and was required to use Github with company email. That shouldn't be a big deal but who likes git profiles with no commits on them. So to continue that grind I had to find a way to use multiple accounts on the same machine because last I checked I didn't have money to buy two separate machines.&lt;/p&gt;

&lt;p&gt;So I looked around and finally found a solution and thought of sharing it with you guys. So let's start hacking.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before getting started
&lt;/h2&gt;

&lt;p&gt;Now that you are here I assume you already have the two emails ready. So I'll be referring to these emails as&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="mailto:personal@mail.com"&gt;personal@mail.com&lt;/a&gt;&lt;/strong&gt; - Personal&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="mailto:work@mail.com"&gt;work@mail.com&lt;/a&gt;&lt;/strong&gt; - Work&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating the SSH keys for your accounts.
&lt;/h2&gt;

&lt;p&gt;First, we will have to generate the key for the Git accounts. So open your terminal and enter 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;cd ~/.ssh

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

&lt;/div&gt;



&lt;p&gt;If for some reason you get an &lt;strong&gt;error&lt;/strong&gt; saying that this &lt;strong&gt;path does not exist&lt;/strong&gt; , Then don't worry you will have to create this directory using the command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir ~/.ssh

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

&lt;/div&gt;



&lt;p&gt;This will create this dir. After you've done that run this command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t rsa -b 4096 -C "personal@email.com"

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

&lt;/div&gt;



&lt;p&gt;Now you will be asked to name this key. You can type &lt;strong&gt;id_rsa_personal&lt;/strong&gt; and save that. You might be asked to enter a password just leave that empty and press enter.&lt;/p&gt;

&lt;p&gt;Now do the same for the work email&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -t rsa -b 4096 -C "work@email.com"

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

&lt;/div&gt;



&lt;p&gt;Now name the key &lt;strong&gt;id_rsa_office&lt;/strong&gt; and leave the password empty.&lt;/p&gt;

&lt;p&gt;After successfully running the above commands will create four files inside the .ssh directory. You can list those by running this command:&lt;/p&gt;

&lt;p&gt;After you're done running these commands it will create &lt;strong&gt;4 files&lt;/strong&gt; inside the &lt;strong&gt;.ssh directory&lt;/strong&gt;. If you wanna see it you can 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;ls -al ~/.ssh

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

&lt;/div&gt;



&lt;p&gt;The generated files should look 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;id_rsa_personal
id_rsa_personal.pub
id_rsa_office
id_rsa_office.pub

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

&lt;/div&gt;



&lt;p&gt;Now we have the keys required for Github.&lt;/p&gt;

&lt;h2&gt;
  
  
  Adding SSH keys to GitHub accounts
&lt;/h2&gt;

&lt;p&gt;Ok, so the process that I'll mention will be the same for the other accounts as well. So you can just follow the same steps for the other accounts as well.&lt;/p&gt;

&lt;p&gt;To &lt;strong&gt;copy&lt;/strong&gt; the key you can run this command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pbcopy &amp;lt; ~/.ssh/id_rsa_personal.pub

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

&lt;/div&gt;



&lt;p&gt;If you want to get copy the work email you can use this command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pbcopy &amp;lt; ~/.ssh/id_rsa_office.pub

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

&lt;/div&gt;



&lt;p&gt;Now go to &lt;a href="https://github.com/"&gt;Github&lt;/a&gt; log in using your personal account or the other account. Now you just have to follow these 6 steps.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click your avatar on the top right corner and click the &lt;strong&gt;Settings&lt;/strong&gt; menu.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0hufgJM1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658172595660/C2Jrjzjem.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0hufgJM1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658172595660/C2Jrjzjem.png" alt="Screen Shot 2022-07-19 at 12.29.48 AM.png" width="480" height="1148"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;On the left side, under the &lt;strong&gt;Personal settings menu&lt;/strong&gt; , click on &lt;strong&gt;SSH and GPG keys&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V8OQh9Sb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658173189285/yIgxrJt-I.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V8OQh9Sb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658173189285/yIgxrJt-I.png" alt="Screen Shot 2022-07-19 at 12.39.16 AM.png" width="738" height="868"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;On the top right corner, click on New SSH key button.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wQaq2nfG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658173101576/yyO_ttA4q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wQaq2nfG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658173101576/yyO_ttA4q.png" alt="Screen Shot 2022-07-19 at 12.36.28 AM.png" width="880" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Add a meaningful title to identify your key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Press cmd + v to paste the copied key.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on Add SSH key to add your key and enter your password if it is asked.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Go through the same steps to add your office SSH key.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating configuration files to add two keys
&lt;/h2&gt;

&lt;p&gt;Now head back to your &lt;strong&gt;terminal&lt;/strong&gt; enter &lt;code&gt;cd ~/.ssh&lt;/code&gt; create a configuration file by using bellow command.&lt;br&gt;
&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;This will create a file named config.&lt;br&gt;
&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;This will open the file using the nano editor&lt;/p&gt;

&lt;p&gt;Then add the following configurations for two accounts.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Personal account
Host github.com-personal
   HostName github.com
   User git
   IdentityFile ~/.ssh/id_rsa_personal

# Office account
Host github.com-office
   HostName github.com
   User git
   IdentityFile ~/.ssh/id_rsa_office

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

&lt;/div&gt;



&lt;p&gt;To save and exit press &lt;strong&gt;ctrl+o&lt;/strong&gt; then press &lt;strong&gt;Enter&lt;/strong&gt; and then press &lt;strong&gt;ctrl+x&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating git configuration files
&lt;/h2&gt;

&lt;p&gt;Using two git configuration files for our personal and office accounts will reduce the stress of managing those accounts by automating the manual process. We'll create a one git configuration file globally for our personal account and the other one in our Office works folder.&lt;/p&gt;

&lt;p&gt;Using your terminal navigate to the root folder to create a global git configuration file for your personal account.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ~
nano .gitconfig

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

&lt;/div&gt;



&lt;p&gt;Then add following configurations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[user]
    name = Your Name
    email = personal@email.com

[includeIf "gitdir:~/office/"]

    path = ~/office/.gitconfig

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

&lt;/div&gt;



&lt;p&gt;Please note that to work the &lt;strong&gt;office&lt;/strong&gt; configuration above, git assumes you have all the &lt;strong&gt;office&lt;/strong&gt; work-related stuff located in a folder called Office. So if it's not the case for you, please feel free to change above config according to your folder structure&lt;/p&gt;

&lt;p&gt;Then, create an office work-related git configuration file. To do that, navigate to your &lt;strong&gt;Office&lt;/strong&gt; folder and type the following commands.&lt;br&gt;
&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;Then add following configurations.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[user]

    email = office@email.com

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Save key identities in local machine
&lt;/h2&gt;

&lt;p&gt;First, we have to remove any existing identities by running 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;cd ~
ssh-add -D

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

&lt;/div&gt;



&lt;p&gt;After delete, check if the newly added keys were saved successfully by running 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;ssh-add -l

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

&lt;/div&gt;



&lt;p&gt;Now you have to authenticate the keys with GitHub by running following commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh -T github.com-personal
ssh -T github.com-office

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

&lt;/div&gt;



&lt;p&gt;Now you can use your multiple accounts on your Mac.&lt;/p&gt;

&lt;p&gt;Now if you want to use your personal email you will have to pass -personal after github.com as shown below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git@github.com-persoanl:USERNAME/REPO_NAME.git

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

&lt;/div&gt;



&lt;p&gt;If you face any issues or have any questions please do ask in the comments below.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This was inspired by &lt;a href="https://www.linkedin.com/in/nadun-malinda/"&gt;Nadun Malinda&lt;/a&gt; blog on the same topic.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Follow me on &lt;a href="http://github.com/rayanabid"&gt;Github&lt;/a&gt; and &lt;a href="https://www.youtube.com/channel/UCbUlt1T9VdaD-9ewO0D5B8w"&gt;Youtube&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bye for now.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to get TypeWriter Effect In ReactJS</title>
      <dc:creator>Rayan Abid</dc:creator>
      <pubDate>Sun, 17 Jul 2022 19:17:06 +0000</pubDate>
      <link>https://dev.to/rayanabid/how-to-get-typewriter-effect-in-reactjs-3228</link>
      <guid>https://dev.to/rayanabid/how-to-get-typewriter-effect-in-reactjs-3228</guid>
      <description>&lt;p&gt;Hey everyone. Hope you all are well. Recently when I was working on my portfolio site which you can checkout at rayanabid.com, I wanted to get a typewriter effect that I saw on most sites. So I thought I might as well share it as I found this method very easy and useful to implement.&lt;/p&gt;

&lt;p&gt;Also on a side note, If you speak urdu/hindi then you can wacth this instead if you prefer video format &lt;a href="https://www.youtube.com/watch?v=2N-PhKF-uVk&amp;amp;t=6s&amp;amp;ab_channel=RayanAbid"&gt;youtube&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So this is the effect we will try to achieve in this article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Z2WxynTM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658084660728/gk7WDRuW5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Z2WxynTM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1658084660728/gk7WDRuW5.gif" alt="ezgif-2-084d5d5721.gif" width="600" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So to get this effect. You only need to be sure of two things.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You need to have a react project setup.&lt;/li&gt;
&lt;li&gt;You need to install this &lt;a href="https://www.npmjs.com/package/typewriter-effect"&gt;package&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Open this &lt;a href="https://www.npmjs.com/package/typewriter-effect"&gt;link&lt;/a&gt; and paste this command in your terminal&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm i typewriter-effect&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After that this package will be installed on your react project.&lt;/p&gt;

&lt;p&gt;Now we just have to import this component in our JSX file. like this&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import Typewriter from 'typewriter-effect';&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once you have imported it you can use it in your return statement.&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;Typewriter
  options={{
    strings: ['Hello', 'World'],
    autoStart: true,
    loop: true,
  }}
/&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;You can replace the strings array with any text you want.&lt;/p&gt;

&lt;p&gt;and viola your typewriter effect is ready.&lt;/p&gt;

&lt;p&gt;Now you can add this to your projects as well.&lt;/p&gt;

&lt;p&gt;Please do share your thoughts as well. and checkout the repo on &lt;a href="https://github.com/RayanAbid/yt-react-typewriter"&gt;github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bye for now.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What is the Blockchain?</title>
      <dc:creator>Rayan Abid</dc:creator>
      <pubDate>Sat, 22 Jan 2022 19:46:24 +0000</pubDate>
      <link>https://dev.to/rayanabid/what-is-the-blockchain-d53</link>
      <guid>https://dev.to/rayanabid/what-is-the-blockchain-d53</guid>
      <description>&lt;h1&gt;
  
  
  Introduction
&lt;/h1&gt;

&lt;p&gt;How many times a day do you hear about bitcoin, Ethereum, web3, blockchain, etc, you might have wondered What is it? How does it work? Can I a piece of the pie? If you've ever wondered about any of these questions then I hop this article can help you in understanding the what and how of blockchain.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Blockchain?
&lt;/h2&gt;

&lt;p&gt;Now there are multiple interpretations and ways to explain &lt;strong&gt;Blockchain&lt;/strong&gt; but I find this definition to be the most comprehensive&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Blockchain is a distributed immutable ledger.&lt;/p&gt;

&lt;p&gt;-- &lt;cite&gt; Kshitij &lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I know that this is not clear at first but let me explain it and I'm sure that you will have a clear image of what it actually is and what is meant by this definition.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a ledger?
&lt;/h3&gt;

&lt;p&gt;To define it simply, A ledger is a collection of transactions. For example: You went to a super market to purchase some goods, When you are at the checkout The cashier enters data into their systems and then that transaction is stored on there system. Now the place where this data is being stored is called a ledger. Given below is a dummy ledger.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--txJtotTY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642583112300/Nk-pY4uVh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--txJtotTY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642583112300/Nk-pY4uVh.png" alt="Trails Balnac.PNG" width="666" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now as you can see that each row shows a transaction similarly, &lt;strong&gt;each block in blockchain stores a transaction.&lt;/strong&gt; The image below will help you in visualizing in what a blockchain looks like.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TzyZ6iuE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642583435677/EG0qI0vbJ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TzyZ6iuE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642583435677/EG0qI0vbJ.jpeg" alt="images.jpeg" width="322" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see in this image it's a series of blocks joined by chains, each block stores a transaction. Now that that's clear.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is immutable?
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;unchanging over time or unable to be changed.&lt;/p&gt;

&lt;p&gt;-- &lt;cite&gt; Definitions from Oxford Languages &lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As suggested by the definition &lt;strong&gt;immutable&lt;/strong&gt; means unchangeable. Now, what does that have to do with what we are learning?&lt;/p&gt;

&lt;p&gt;Now if you see the ledger or the example is given above, We are using some &lt;strong&gt;database&lt;/strong&gt; or some &lt;strong&gt;paper&lt;/strong&gt; to record the &lt;strong&gt;transactions&lt;/strong&gt; , But one thing that you might find common in these methods is that these can be easily altered.&lt;/p&gt;

&lt;p&gt;Compare that to blockchain &lt;strong&gt;Once a transaction has been recorded it cannot be changed&lt;/strong&gt; this is one of the most important concepts to keep in mind when working with the blockchain.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does distributed mean?
&lt;/h3&gt;

&lt;p&gt;Distributed means shared or spread out. Now keeping this in mind we now know that blockchain is spread out, But what do I mean by that.&lt;/p&gt;

&lt;p&gt;This means that all the information is spread out to all the systems in the blockchain. Each system has a copy of the blockchain.&lt;/p&gt;

&lt;p&gt;Now that we have Defined the blockchain, Let's see how it works. &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WKy1AABr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642879588506/egEq9w40V.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WKy1AABr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642879588506/egEq9w40V.png" alt="Screenshot 2022-01-23 at 12.23.29 AM.png" width="880" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;-- &lt;cite&gt; codedamn.com &lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now this is what the systems look like. Now each system has a copy of the blockchain. Containing all the transactions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uXuOjbmT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642879686548/8PzgTm-4m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uXuOjbmT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642879686548/8PzgTm-4m.png" alt="Screenshot 2022-01-23 at 12.24.52 AM.png" width="880" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;-- &lt;cite&gt; codedamn.com &lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now consider one system process a transaction. After it's done processing it sends out all the information to rest of the systems.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--_AMXrzCo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642879758511/EuAryoZlh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--_AMXrzCo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642879758511/EuAryoZlh.png" alt="Screenshot 2022-01-23 at 12.25.01 AM.png" width="880" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;-- &lt;cite&gt; codedamn.com &lt;/cite&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The process of processing transactions is known as &lt;strong&gt;mining&lt;/strong&gt;. Now that we know how the blockchain works let's look into why some cryptocurrencies are worth more.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different blockchains
&lt;/h2&gt;

&lt;p&gt;Yes, the heading is totally right there are multiple blockchains and each cryptocurrency lives on it's own blockchain. Think of it like this each company has it's own ledger similarly each cryptocurrency has it's own blockchain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Judging the worth
&lt;/h2&gt;

&lt;p&gt;Now one question that comes into our minds is why some blockchains are worth more than others. That is because each blockchain has it's own unique pros and cons to further elaborate let's compare the two most popular cryptocurrencies/blockchains.&lt;/p&gt;

&lt;h3&gt;
  
  
  Comparing eth and btc
&lt;/h3&gt;

&lt;p&gt;Now even if you are new to all of this I'm 90% sure you might have heard of eth and btc. Btc was the first cryptocurrency but you couldn't actually do anything with it. That is where the Ethereum blockchain introduced itself, Because not only was it a currency but you could also make Dapps for it which means we can actually buy something with it. NFT's are a great example of how this works. Stay tuned for an article on introduction to that as well.&lt;/p&gt;

&lt;p&gt;Keep in mind the shit coins that are getting popular day by day have no uses as well as they are just being used for pumps and dumps which means to just buy low and sell high.&lt;/p&gt;

&lt;p&gt;I hope that this article was useful and helped you in better understanding the blockchain and how it works. I'll also be uploading an article on what are the generations of web and how to get started on building Dapps etc. So if you are interested then drop a follow and join my newsletter.&lt;/p&gt;

&lt;p&gt;If you have any questions ask away in the comment section below. I'll be happy to help.&lt;/p&gt;

&lt;p&gt;Bye for now.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Level up your terminal</title>
      <dc:creator>Rayan Abid</dc:creator>
      <pubDate>Fri, 14 Jan 2022 09:05:31 +0000</pubDate>
      <link>https://dev.to/rayanabid/level-up-your-terminal-1jhd</link>
      <guid>https://dev.to/rayanabid/level-up-your-terminal-1jhd</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Well, how many of you think while working on your terminal that why do I have to write everything, Can't there just be some kind of auto-complete. Oh, no one here, maybe my Mom is right that I'm spoiled, Anyways let me introduce you to fig.io IntelliSense for your terminal.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is fig
&lt;/h3&gt;

&lt;p&gt;Fig is an open-source terminal that autocompletes most of your commands on your terminal. Whether it's installing &lt;strong&gt;npm packages&lt;/strong&gt; , committing to &lt;strong&gt;Github&lt;/strong&gt; or just changing directories with your terminal.&lt;/p&gt;

&lt;p&gt;Fig is also open source which means if fig already does not have the commands available for your needs you can go ahead and add them yourselves.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing fig
&lt;/h3&gt;

&lt;p&gt;Installing fig is super simple just visit the link &lt;a href="https://fig.io/invite?code=7fvL3MigEU"&gt;fig.io/invite&lt;/a&gt; or &lt;a href="https://fig.io/"&gt;fig.io&lt;/a&gt; which will then take you to their homepage and you can simply download it from there.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6eSLNuVF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642148006181/Ksp4wgR4j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6eSLNuVF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642148006181/Ksp4wgR4j.png" alt="Screenshot 2022-01-14 at 1.13.20 PM.png" width="880" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After it's done downloading, open it up and go through the installation process.&lt;/p&gt;

&lt;p&gt;You can check out the installation process &lt;a href="https://fig.io/docs/getting-started"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But their installer does a good job of getting you through it and familiarizing you with there terminal as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  Time to enjoy
&lt;/h3&gt;

&lt;p&gt;Now that you have fig installed you should be able to have the autocompletion. The gif below shows &lt;strong&gt;Fig&lt;/strong&gt; in action.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yKYO7_MQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642150878974/4TznNfwsx.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yKYO7_MQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642150878974/4TznNfwsx.gif" alt="fig.gif" width="600" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hope you found it useful. If you did please do let me know in the comments and by reacting to the blog. Plus if you have any topic ideas do let me know as I'm starting out and would love if you suggested something.&lt;/p&gt;

&lt;p&gt;Thanks.&lt;/p&gt;

&lt;p&gt;Bye for now.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Start making API calls using React redux-thunk</title>
      <dc:creator>Rayan Abid</dc:creator>
      <pubDate>Wed, 12 Jan 2022 18:40:01 +0000</pubDate>
      <link>https://dev.to/rayanabid/start-making-api-calls-using-react-redux-thunk-1k6p</link>
      <guid>https://dev.to/rayanabid/start-making-api-calls-using-react-redux-thunk-1k6p</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Redux and React js an awesome pair to have, But a pain to work with if you're a beginner. Hopefully, this article will help in making it easy for you.&lt;/p&gt;

&lt;p&gt;But first what is Redux.&lt;/p&gt;

&lt;h2&gt;
  
  
  Redux
&lt;/h2&gt;

&lt;p&gt;Redux is a state management tool that helps you in managing the states. What do I mean by managing the state. Think of a scenario that you built a web app that allows users to login, Now after they have logged in you have to display there information on a lot of components.&lt;/p&gt;

&lt;p&gt;The first option that would come to your mind if you're starting out is that you should pass it through props. But believe me when I say that this isn't the best option and will make things more complicated than it should be.&lt;/p&gt;

&lt;p&gt;The second option you have is to use some state manager like Redux, Mobx, or context API. But we will be focusing on using Redux as this is the most popular and I'm most familiar with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up a React project.
&lt;/h2&gt;

&lt;p&gt;Now if you are trying to learn Redux you should be familiar with this, But let's go through it once more. First you have to run.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx create-react-app your-app-name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gKzds8Rd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642008923932/JKGUBpHNk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gKzds8Rd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642008923932/JKGUBpHNk.png" alt="create-react-app.png" width="682" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;as you can see I named my project &lt;strong&gt;redux-starter&lt;/strong&gt; you can name it whatever you want.&lt;/p&gt;

&lt;p&gt;Now once it has finished installing lets open the folder in VS Code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2PvdyTR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642009235275/nREwd35xl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2PvdyTR7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642009235275/nREwd35xl.png" alt="open vs code.png" width="880" height="636"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;you should see something similar to this.&lt;/p&gt;

&lt;p&gt;Now let's install the required packages to setup redux with react js. Run the following command in the vscode terminal. You can open your terminal using &lt;code&gt;ctrl +&lt;/code&gt; ` or&lt;/p&gt;

&lt;p&gt;&lt;code&gt;cmd + &lt;/code&gt; ` if you're on a mac.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm i react-redux redux redux-logger redux-thunk&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FebV5weR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642009637097/1igX6JYkJ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FebV5weR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642009637097/1igX6JYkJ.png" alt="npm i redux.png" width="880" height="636"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After installing these packages run&lt;/p&gt;

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

&lt;p&gt;This will start the project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Congratulations&lt;/strong&gt; on starting your React project. Now a chrome tab should open up and you should see something similar to this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZMZaK6DZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642009604670/Kbiy2PNAV.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZMZaK6DZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642009604670/Kbiy2PNAV.png" alt="project started.png" width="880" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Importing the required packages
&lt;/h2&gt;

&lt;p&gt;Now that you have a running react project. Goto &lt;code&gt;index.js&lt;/code&gt; and import the following at the top of the file.&lt;br&gt;
&lt;/p&gt;

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

const store = createStore(reducer, applyMiddleware(thunk, logger));

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

&lt;/div&gt;



&lt;p&gt;Ok now to go through what each one is used for.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://react-redux.js.org/"&gt;react-redux&lt;/a&gt; is the package that connects redux with react.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://redux.js.org/"&gt;redux&lt;/a&gt; is the state management tool.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.npmjs.com/package/redux-logger"&gt;redux-logger&lt;/a&gt; is just a middleware that helps you by logging into the console if there is any change in any of states. &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.npmjs.com/package/redux-thunk"&gt;redux-thunk&lt;/a&gt; Thunk middleware for Redux. It allows writing functions with logic inside that can interact with a Redux store's dispatch and getState methods.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that all of that is out of the way. Wrap your tags inside the provider tag like this and pass it the store variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ReactDOM.render(
  &amp;lt;React.StrictMode&amp;gt;
    // add this
    &amp;lt;Provider store={store}&amp;gt;
      &amp;lt;App /&amp;gt;
    &amp;lt;/Provider&amp;gt;
  &amp;lt;/React.StrictMode&amp;gt;,
  document.getElementById("root")
);

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

&lt;/div&gt;



&lt;p&gt;Now I know that some of you saved and tried to check the react app, And might be facing some errors. Don't worry this should happen as we don't have the reducer file yet so let's create that.&lt;/p&gt;

&lt;h3&gt;
  
  
  The redux folder
&lt;/h3&gt;

&lt;p&gt;In the &lt;code&gt;src&lt;/code&gt; directory create a new folder and name it &lt;code&gt;redux&lt;/code&gt; and create two sub-folders inside the &lt;code&gt;redux&lt;/code&gt; folder named &lt;code&gt;action&lt;/code&gt; and &lt;code&gt;reducers&lt;/code&gt;. It should look something like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P_G-SjXG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642010721420/swgr52XJV.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P_G-SjXG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642010721420/swgr52XJV.png" alt="dir.png" width="182" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we have the files first open the &lt;code&gt;index.js&lt;/code&gt; in the &lt;code&gt;action&lt;/code&gt; folder and &lt;strong&gt;export action&lt;/strong&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;export * from "./action";

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

&lt;/div&gt;



&lt;p&gt;Now in your &lt;code&gt;action.js&lt;/code&gt; file 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;export const firstAction = (data) =&amp;gt; async (dispatch) =&amp;gt; {
  var requestOptions = {
    method: "GET",
    redirect: "follow",
  };

  fetch("https://randomuser.me/api/", requestOptions)
    .then((response) =&amp;gt; response.json())
    .then((result) =&amp;gt; {
      dispatch({
        type: "firstAction",
        data: result.results[0],
      });
    })
    .catch((error) =&amp;gt; console.log("error", error));
};

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

&lt;/div&gt;



&lt;p&gt;this is a dummy fetch request so that we can actually see if we are able to fetch data from the &lt;a href="https://randomuser.me/api/"&gt;randomuser.me&lt;/a&gt; API. This is a simple fetch request you can also use &lt;code&gt;axios&lt;/code&gt; if you like, But I'm using simple fetch to keep things simple.&lt;/p&gt;

&lt;p&gt;ok the action part is done. Now let's add the following in the &lt;code&gt;reducer.js&lt;/code&gt; file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const initialState = {
  firstState: [],
};

const changeState = (state = initialState, { type, ...rest }) =&amp;gt; {
  switch (type) {
    case "set":
      return { ...state, ...rest };
    case "firstAction":
      return { ...state, firstState: rest.data };

    default:
      return state;
  }
};

export default changeState;

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

&lt;/div&gt;



&lt;p&gt;So, the variable initial state is the value of the state that it will be in beginning. The change state function is the actual stuff the &lt;code&gt;type&lt;/code&gt; and &lt;code&gt;rest&lt;/code&gt; are the parameters that are being passed from the action.js file. Hope that it's clear.&lt;/p&gt;

&lt;h3&gt;
  
  
  Updating App.js
&lt;/h3&gt;

&lt;p&gt;Finally we are at the end.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/s4kpsTSwoiFCU/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/s4kpsTSwoiFCU/giphy.gif" alt="It's the final countdown" width="500" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In your &lt;code&gt;App.js&lt;/code&gt; import the following&lt;br&gt;
&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;firstAction&lt;/code&gt; is the action that we created in the &lt;code&gt;redux/action/action.js&lt;/code&gt; directory, &lt;code&gt;useDispatch&lt;/code&gt; is the hook that helps us in dispatching functions and &lt;code&gt;useSelector&lt;/code&gt; is the hook that helps us to access our states.&lt;/p&gt;

&lt;p&gt;in your &lt;code&gt;App(props)&lt;/code&gt; function add a &lt;code&gt;useEffect()&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;  useEffect(async () =&amp;gt; {
    await dispatch(firstAction());
  }, []);

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

&lt;/div&gt;



&lt;p&gt;We are calling action that we created every time the component mounts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't forget to import useEffect at the top&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;import React, { useEffect } from "react";&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Ok, Finally let's call the &lt;code&gt;useDispatch()&lt;/code&gt; and &lt;code&gt;useState()&lt;/code&gt; at the top before the return and after initiating the function.&lt;br&gt;
&lt;/p&gt;

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

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

&lt;/div&gt;



&lt;p&gt;Now just update your return and call the reducer state.&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="App"&amp;gt;
      &amp;lt;header className="App-header"&amp;gt;
        &amp;lt;img src={logo} className="App-logo" alt="logo" /&amp;gt;
        &amp;lt;p&amp;gt;test {state.firstState.gender}&amp;lt;/p&amp;gt;
      &amp;lt;/header&amp;gt;
    &amp;lt;/div&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;Once you are done your App.js should look 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;import React, { useEffect } from "react";

import logo from "./logo.svg";
import "./App.css";

import { firstAction } from "./redux/action";
import { useDispatch, useSelector } from "react-redux";

function App() {
  const state = useSelector((state) =&amp;gt; state);
  const dispatch = useDispatch();
  // To fetch data when component mounts.
  useEffect(async () =&amp;gt; {
    await dispatch(firstAction());
  }, []);

  return (
    &amp;lt;div className="App"&amp;gt;
      &amp;lt;header className="App-header"&amp;gt;
        &amp;lt;img src={logo} className="App-logo" alt="logo" /&amp;gt;
        &amp;lt;p&amp;gt;test {state.firstState.gender}&amp;lt;/p&amp;gt;
      &amp;lt;/header&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;

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

&lt;/div&gt;



&lt;p&gt;Now if you save and run the project you should see male or female. According to what the API returned. Like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---Ds3oD5d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642012420292/iw8AAXOq9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---Ds3oD5d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1642012420292/iw8AAXOq9.png" alt="Screenshot 2022-01-12 at 11.33.33 PM.png" width="880" height="472"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hopefully, you were able to get it running as well, But if in any case, you faced any issues you can ask me in the comment section I'll try my best to answer your questions, or if you want to the &lt;strong&gt;git repo&lt;/strong&gt; you can find it here a follow and a star would be appreciated 😃&lt;/p&gt;

&lt;p&gt;Bye for now.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/RayanAbid/react-redux-starter"&gt;Rayan Abid Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/channel/UCbUlt1T9VdaD-9ewO0D5B8w"&gt;Rayan Abid Youtube&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>An open source Javascript game engine.</title>
      <dc:creator>Rayan Abid</dc:creator>
      <pubDate>Sat, 08 Jan 2022 12:16:16 +0000</pubDate>
      <link>https://dev.to/rayanabid/an-open-source-javascript-game-engine-2lb6</link>
      <guid>https://dev.to/rayanabid/an-open-source-javascript-game-engine-2lb6</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Well, we've all been there you want to make games but don't want to invest time in downloading some game engine and learn the language to make games on it, or the software ends up being too expensive. What I have for you today hits most of these points. It's open-source, it's free, and If you're familiar with javascript then you are all good to go.&lt;/p&gt;

&lt;p&gt;Say hello to ct.js the open-source 2d game engine that is available on windows, mac, and Linux as well. It is small in size with great documentation to get you started with building your first game. I knew nothing about game development or ctj.s but was able to get a simple space-shooter game in about an hour.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7l4ssriS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1641643398343/fwBKwAWQU.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7l4ssriS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1641643398343/fwBKwAWQU.jpeg" alt="homepagescreenshot.jpeg" width="880" height="588"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic concepts
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Importing Textures
&lt;/h3&gt;

&lt;p&gt;Importing textures is super easy when you are in a project just goto the textures tab and import your textures.&lt;/p&gt;

&lt;h3&gt;
  
  
  Easy character animations
&lt;/h3&gt;

&lt;p&gt;Animating your characters is also handled by CT.js you just have to import your character sprite sheet. You can find many sprite sheets from &lt;a href="https://www.spriters-resource.com/"&gt;the sprite resource&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VxWNdr41--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1641643762269/uCTbAzWi7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VxWNdr41--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1641643762269/uCTbAzWi7.png" alt="tutPlatformer_04.b3431334.png" width="880" height="579"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Builds
&lt;/h3&gt;

&lt;p&gt;Ct.js allows you to build your games for web as well as desktop using the same code. And if you are skilled enough there is also a way of building your games using cordova to release it for android and ios as well.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;CT.js is a very cool game engine if you are someone like me who knows javascript and has a low spec machine that can't run unity but want to build games. You can learn more about CT.js from &lt;a href="https://ctjs.rocks/"&gt;this link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have you tried CT.js yet or know of any other game engines do let me know and share your thoughts as well. Thank you for your time.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>The basics of web</title>
      <dc:creator>Rayan Abid</dc:creator>
      <pubDate>Fri, 22 Oct 2021 06:50:43 +0000</pubDate>
      <link>https://dev.to/rayanabid/the-basics-of-web-icb</link>
      <guid>https://dev.to/rayanabid/the-basics-of-web-icb</guid>
      <description>&lt;p&gt;&lt;strong&gt;HTML&lt;/strong&gt; is also known as a &lt;strong&gt;hypertext markup language&lt;/strong&gt; which is a standard markup language that can be used to represent information on the &lt;strong&gt;internet&lt;/strong&gt;. &lt;strong&gt;HTML&lt;/strong&gt; plays a very important role in the journey of a &lt;strong&gt;front-end web developer&lt;/strong&gt; as it is used to write down the structure of the &lt;strong&gt;website&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now that the technical introduction is out of the way let's try to understand it in a nonexclusive way.&lt;/p&gt;

&lt;p&gt;Let's think of a building now to compare it with &lt;strong&gt;HTML&lt;/strong&gt; you can say that the structure of the building is what you would write for a website using &lt;strong&gt;HTML&lt;/strong&gt;. Hope that makes it clear and helps you in understanding the bigger picture. But now one question that would be popping into your mind is then what will we use to make the building prettier i.e: painting etc. That is where CSS comes into play but that is our next topic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sidenote
&lt;/h2&gt;

&lt;p&gt;I also have a video on this topic if you prefer watching instead of reading. In this video I go in depth in HTML.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=cK1gWWEfke0"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s-KQHy59--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://img.youtube.com/vi/cK1gWWEfke0/0.jpg" alt="IMAGE ALT TEXT HERE" width="480" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Where to get started?
&lt;/h3&gt;

&lt;p&gt;There are a lot of online resources that you can use to learn &lt;strong&gt;HTML&lt;/strong&gt; which are as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
### W3Schools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ro-0mNfc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://webbygram.com/wp-content/uploads/2017/05/W3schools-Logo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ro-0mNfc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://webbygram.com/wp-content/uploads/2017/05/W3schools-Logo.png" alt="" width="300" height="300"&gt;&lt;/a&gt;&lt;a href="https://www.w3schools.com/"&gt;W3Schools&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;W3Schools is a freemium educational website for learning coding online. Developed in 1998, its name is derived from the World Wide Web. It is run by &lt;strong&gt;Refsnes Data&lt;/strong&gt; in Norway.&lt;/p&gt;

&lt;p&gt;W3Schools has a collection of documents for all your &lt;strong&gt;HTML&lt;/strong&gt; needs and it is not just &lt;strong&gt;HTML&lt;/strong&gt; it includes education materials for all the other languages as well such as: Javascript, CSS etc.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
### freeCodeCamp&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PDn6I1Ji--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--lfMhrPQM--/c_imagga_scale%2Cf_auto%2Cfl_progressive%2Ch_900%2Cq_auto%2Cw_1600/https://dev-to-uploads.s3.amazonaws.com/i/rphqzfoh2cbz3zj8m8t1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PDn6I1Ji--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--lfMhrPQM--/c_imagga_scale%2Cf_auto%2Cfl_progressive%2Ch_900%2Cq_auto%2Cw_1600/https://dev-to-uploads.s3.amazonaws.com/i/rphqzfoh2cbz3zj8m8t1.png" alt="" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.freecodecamp.org/"&gt;freeCodeCamp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;freeCodeCamp is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. They also have many video tutoriols as well if you think that you can learn more visually.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
### Mike Dane&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7Rk91SBM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://yt3.ggpht.com/ytc/AKedOLRxS2W0dkrbJErKUdm-q-ZHp6QGMnBIIkiNKF38nw%3Ds900-c-k-c0x00ffffff-no-rj" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Rk91SBM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://yt3.ggpht.com/ytc/AKedOLRxS2W0dkrbJErKUdm-q-ZHp6QGMnBIIkiNKF38nw%3Ds900-c-k-c0x00ffffff-no-rj" alt="" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.mikedane.com/"&gt;Mike Dane's website&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Mike Dane has one simple goal, to create the highest quality and entertaining educational content on the internet.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and I gotta say I don't disagree with him. As he is the first person that I went to learn and understand the basics of HTML CSS and JS. He also has great content for C++ as well.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
### Codecademy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8bnC0PZV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://images.codecademy.com/social/logo-codecademy-social.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8bnC0PZV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://images.codecademy.com/social/logo-codecademy-social.png" alt="" width="880" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.codecademy.com/"&gt;Codecademy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Codecademy is an American online interactive platform that offers free coding classes in 12 different programming languages including Python, Java, Go, JavaScript, Ruby, SQL, C++, C#, Swift, and Sass, as well as markup languages HTML and CSS.&lt;/p&gt;

&lt;p&gt;And there you go what do you think do you have any more places that I missed or I haven't listed down do let me know and if you feel like I can improve in any please do let me know and share your thoughts down below.&lt;/p&gt;

&lt;p&gt;Thank you for your time.&lt;/p&gt;

&lt;p&gt;Follow me on &lt;a href="http://github.com/rayanabid"&gt;Github&lt;/a&gt;,&lt;a href="https://www.youtube.com/channel/UCbUlt1T9VdaD-9ewO0D5B8w"&gt;Youtube&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://unsplash.com/photos/4hbJ-eymZ1o?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditShareLink"&gt;Image provided from unsplash.&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
