<?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>Forem: Tchassi Jordan </title>
    <description>The latest articles on Forem by Tchassi Jordan  (@tchassi_jordan).</description>
    <link>https://forem.com/tchassi_jordan</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%2F625228%2F77c6c03e-18d3-4ffe-a9d4-02dd4a7669f0.jpg</url>
      <title>Forem: Tchassi Jordan </title>
      <link>https://forem.com/tchassi_jordan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/tchassi_jordan"/>
    <language>en</language>
    <item>
      <title>Is React.js still worth learning in 2023?</title>
      <dc:creator>Tchassi Jordan </dc:creator>
      <pubDate>Sun, 26 Feb 2023 10:54:48 +0000</pubDate>
      <link>https://forem.com/tchassi_jordan/is-reactjs-still-worth-learning-in-2023-52b6</link>
      <guid>https://forem.com/tchassi_jordan/is-reactjs-still-worth-learning-in-2023-52b6</guid>
      <description>&lt;p&gt;React.js is meta backed javascript library, and today it's considered as the most widely used javascript library. But increasingly most folks(well tech twitter) have been referencing it as being dead, and that it's rather worth learning other libraries/framework over it. Well the energy and perspectives of folks on social media can be quite misleading at times, so it's best to always look at the real numbers/metrics before taking your decision.&lt;/p&gt;

&lt;p&gt;So I'll try to do a comprehensive study based on two very important criteria, you should always consider before learning a new technology. These metrics are going to be &lt;strong&gt;community &amp;amp; ecosystem&lt;/strong&gt;, and &lt;strong&gt;job market &amp;amp; talent&lt;/strong&gt;. With these we can take a reasonable conclusion based on the numbers rather than following folks' perspectives blindly.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Community &amp;amp; Ecosystem
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;In my opinion the community &amp;amp; ecosystem of a tech stack is the most thing to consider before learning it. No one likes the feeling of surfing through google for countless hours and not finding a solution to his/her problem. That's the effect of having a poor community.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;React.js since it's introduction back in 2013 has grown so much in popularity. It's concept of building UI in terms of component has largely been adopted by the front end industry, and as of now react.js has one of the larges communities out there. You can basically see responses to entry entry level problem you encounter with the library by just hopping stack over flow. &lt;/p&gt;

&lt;p&gt;Here are two very important 2022 surveys. The first conducted by stack over flow, and here we can clearly see how react.js tops the charts in terms of the libraries used by both professionals and those learning to code.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://survey.stackoverflow.co/2022/#most-popular-technologies-webframe" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsurvey.stackoverflow.co%2F2022%2Fup_%2Fsrc%2Fimg%2Fdev-survey-2022.png" height="420" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://survey.stackoverflow.co/2022/#most-popular-technologies-webframe" rel="noopener noreferrer" class="c-link"&gt;
          Stack Overflow Developer Survey 2022
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          In May 2022 over 70,000 developers told us how they learn and level up, which tools they’re using, and what they want.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fsurvey.stackoverflow.co%2F2022%2Ffavicon.ca238093.ico" width="32" height="32"&gt;
        survey.stackoverflow.co
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The second survey was conducted by the state of javascript. Yet again React.js tops the charts for the used library on the front end. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://2022.stateofjs.com/en-US/libraries/front-end-frameworks/" rel="noopener noreferrer"&gt;https://2022.stateofjs.com/en-US/libraries/front-end-frameworks/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With that we can start to see how large the React ecosystem presently is.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Job market &amp;amp; talent
&lt;/h2&gt;

&lt;p&gt;If you are someone like me trying to make a living as a software engineer then this definetly is an important metrics to consider. &lt;br&gt;
I took a look at the number of jobs in demand on upwork(the world's leading freelance platform) for react, angular, vue, svelte developers. Here's what I came out with.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tech stack&lt;/th&gt;
&lt;th&gt;Number of jobs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;React.js&lt;/td&gt;
&lt;td&gt;5,768&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vue.js&lt;/td&gt;
&lt;td&gt;1,173&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Angular&lt;/td&gt;
&lt;td&gt;1,589&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Svelte&lt;/td&gt;
&lt;td&gt;311&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Clearly React.js developers are very much in need, the gap is mind blowing.&lt;/p&gt;

&lt;p&gt;Taking those these metrics into consideration more specifically the ecosystem &amp;amp; community we can clearly see that react.js is still very must alive. Infact the majority of new framework/libraries out there now like Solid, Preact are some what derivatives of react.js&lt;/p&gt;

&lt;p&gt;So if you're considering learning to code in 2023, then the numbers are up, now the decision is up to you. Until the next time&lt;/p&gt;

</description>
      <category>bitcoin</category>
      <category>recovery</category>
      <category>cryptocurrency</category>
      <category>crypto</category>
    </item>
    <item>
      <title>How to create a SnackBar with Next.js</title>
      <dc:creator>Tchassi Jordan </dc:creator>
      <pubDate>Sun, 05 Feb 2023 14:20:57 +0000</pubDate>
      <link>https://forem.com/tchassi_jordan/how-to-create-a-snackbar-with-nextjs-20i5</link>
      <guid>https://forem.com/tchassi_jordan/how-to-create-a-snackbar-with-nextjs-20i5</guid>
      <description>&lt;p&gt;Most at times while building websites with features like authentication, popup notifications we usually need a way to opt in to the current user view and show some vital information without taking a lot of the user's attention. Well, if you're aiming to do that then using a snackbar could be your best bit. &lt;br&gt;
My aim through this article is to help you set that up quickly, without having to add UI component libraries like &lt;a href="https://mui.com/material-ui/getting-started/overview/"&gt;Material UI&lt;/a&gt; onto your app.  &lt;/p&gt;
&lt;h3&gt;
  
  
  Road map
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Prerequisite&lt;/li&gt;
&lt;li&gt;Creating Simple Snackbar

&lt;ol&gt;
&lt;li&gt;Create snackbar component&lt;/li&gt;
&lt;li&gt;Create Snackbar state with useReducer&lt;/li&gt;
&lt;li&gt;Create Snackbar Context &lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Combining everything together&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  1. Prerequisite
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://nextjs.org/docs/getting-started"&gt;Nextjs project&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;TypeScript&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tailwindcss.com/docs/guides/nextjs"&gt;Tailwind CSS&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Little understanding with using &lt;code&gt;useReducer&lt;/code&gt; for state management in React&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  2. Creating Snackbar Component
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Create snackbar component
&lt;/h3&gt;

&lt;p&gt;First we'll need to create our snackbar types and props. Create a new folder called components at the root of your project, in the folder create a file called types.ts&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;components/types.ts&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Now we need to create the snackbar component itself. So we'll create a new file in the &lt;code&gt;components&lt;/code&gt; folder we created earlier called &lt;code&gt;Snackbar.tsx&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;components/Snackbar.tsx&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;With those two steps, you should have a components folder with the following structure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- components
    | types.ts
    | Snackbar.tsx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So now, we have our Snackbar component ready to be consumed. Next up, we need to create snackbar state.&lt;/p&gt;
&lt;h3&gt;
  
  
  Create Snackbar state with useReducer
&lt;/h3&gt;

&lt;p&gt;For the state, we principally have to control two things; &lt;em&gt;the Snackbar state when it's open&lt;/em&gt;, and &lt;em&gt;the Snackbar state when it's close&lt;/em&gt;&lt;br&gt;
So for that, we'll use useReducer to define state logic&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;You can use &lt;code&gt;useState&lt;/code&gt; for this but I'll rather go with &lt;code&gt;useReducer&lt;/code&gt; to keep code much more readable&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For the reducer function, let's create a folder at the root of your project called &lt;code&gt;lib&lt;/code&gt;, and in the folder create another nested folder called &lt;code&gt;utils&lt;/code&gt;. Create a file called &lt;code&gt;reducer.ts&lt;/code&gt; inside the &lt;code&gt;utils&lt;/code&gt; folder, this is the file in which we'll put the reducer code logic.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;lib/utils/reducer.ts&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;h3&gt;
  
  
  Create Snackbar Context
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;You must be asking yourself, but why use context create a snackbar component??&lt;/em&gt; &lt;br&gt;
&lt;em&gt;Shouldn't we just create a snackbar component that we can import when ever we need to use it??&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Well, we are using context because we don't want to import the &lt;code&gt;Snackbar&lt;/code&gt; component all over our app, we just want to call a function anywhere in our app and that function takes care of adding the &lt;code&gt;Snackbar&lt;/code&gt; to the viewport.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;From the end of the last section we have our &lt;em&gt;Snackbar component&lt;/em&gt;, and the &lt;em&gt;reducer function&lt;/em&gt; that manages it's state. Now we'll create a new folder called &lt;code&gt;context&lt;/code&gt; in the root level &lt;code&gt;lib&lt;/code&gt; folder we created earlier. In the &lt;code&gt;context&lt;/code&gt;&lt;br&gt;
 folder, let's create a file called &lt;code&gt;SnackbarProvider.tsx&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;lib/context/SnackbarProvider.tsx&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Combining this step and the previous one, you should have a lib folder at the root of your app with the following structure.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- lib
  - context
     | SnackbarProvider.tsx
  - utils
     | reducer.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  3. Combining everything together
&lt;/h2&gt;

&lt;p&gt;At this point all that's let to do is to add the Snackbar context provider we created above to the &lt;code&gt;_app&lt;/code&gt; file in &lt;code&gt;pages/_app.js&lt;/code&gt;. This way the snackbar context is available globally&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;Congrats, we can access the snackbar context globally. &lt;br&gt;
Copy and paste the code below in your &lt;code&gt;pages/index.tsx&lt;/code&gt; file to test the component&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Here's the link to the production deployment. &lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="https://custom-nextjs-snackbar.vercel.app/" rel="noopener noreferrer"&gt;
      custom-nextjs-snackbar.vercel.app
    &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;You can equally get the full code have the complete source code on my my &lt;a href="https://github.com/tchassijordan/custom_nextjs_snackbar"&gt;github repo&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Now that it for this guide, see you next time. And if you like this guide please leave a like.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>react</category>
      <category>tutorial</category>
      <category>typescript</category>
    </item>
    <item>
      <title>How to Create a Carousel App in React JS</title>
      <dc:creator>Tchassi Jordan </dc:creator>
      <pubDate>Thu, 28 Oct 2021 12:56:19 +0000</pubDate>
      <link>https://forem.com/tchassi_jordan/how-to-create-a-carousel-in-react-js-4872</link>
      <guid>https://forem.com/tchassi_jordan/how-to-create-a-carousel-in-react-js-4872</guid>
      <description>&lt;h2&gt;
  
  
  Let's start.
&lt;/h2&gt;

&lt;p&gt;In this article we'll follow some simple steps in order to realise a simple image carousel in React using &lt;code&gt;create-react-app&lt;/code&gt;. This article assumes the reader has little or basic knowledge working with react and equally react hooks. The first thing to note is that we'll be building this carousel app using a functional component while utilising react hooks for state management. In addition to the above we'll also build our own custom hook from scratch. If you're someone like me you probably want to kick into the real action already, so let's do that right away. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Create our Carousel App
&lt;/h3&gt;

&lt;p&gt;Start by creating the &lt;strong&gt;Carousel app&lt;/strong&gt; using &lt;code&gt;create-react-app&lt;/code&gt;. If you have no knowledge about doing this you can visit their documentation at &lt;a href="https://reactjs.org/docs/create-a-new-react-app.html" rel="noopener noreferrer"&gt;Create react app link here&lt;/a&gt;. They have a detailed explanation far better than anything I can give you.&lt;/p&gt;

&lt;p&gt;At the end you should have a folder that contains our app and it's modules. All our code will be written in the &lt;strong&gt;&lt;em&gt;App.js&lt;/em&gt;&lt;/strong&gt; file found in the src folder&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%2F8xpyp8zdy55uykx4jmov.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%2F8xpyp8zdy55uykx4jmov.png" alt="app image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Edit the &lt;strong&gt;App.js&lt;/strong&gt; file to look something like the code below&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Carousel&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;This is our carousel container&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Add our images to the app
&lt;/h3&gt;

&lt;p&gt;Webpack has some build issues dealing with internal images. The best and easiest work around this issues is to store our images in the public folder(where our index.html is found), this will make webpack include our images during the build process.&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%2F6u10da4n2o7tcit64k96.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%2F6u10da4n2o7tcit64k96.png" alt="public image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We'll create an images folder inside the public folder to hold all our carousel images. Well you could decide to put them directly in the public directory that won't cause any problems but to follow certain convention I advice you put them in the images folder.&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%2Fy0t948bim5qe5luqfhoq.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%2Fy0t948bim5qe5luqfhoq.png" alt="Images folder"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Let's create an array to hold all the images path found in the public folder and a variable called &lt;em&gt;currentImg&lt;/em&gt; which will point to the current image being rendered. Create an image tag with it's &lt;code&gt;src&lt;/code&gt; the value of currentImg.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Carousel&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;gallery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/images/bark-cake-bg.jpg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/images/birthday-cake.jpg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/imageschocolate.jpg/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/images/cupcakes3.jpg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;currentImg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;gallery&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;currentImg&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"slide"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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


&lt;p&gt;We're doing this because we want to loop/iterate over the gallery array and select different image path to be rendered using this array indexes. &lt;br&gt;
&lt;br&gt;&lt;br&gt;
Right now the image that is display depends on the value of &lt;em&gt;currentImg&lt;/em&gt;, which is hard coded to &lt;em&gt;gallery[0]&lt;/em&gt;. We need a way to change it's value rather than it being static like above.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
The best way to do that is introducing state. Since we are using a functionally react component, the only way to add state to it is by using react hooks.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Carousel&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;gallery&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/images/bark-cake-bg.jpg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/images/birthday-cake.jpg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/imageschocolate.jpg/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/images/cupcakes3.jpg&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;currentImg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;count&lt;/span&gt;
        &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
                &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;currentImg&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"slide"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Handling the &lt;em&gt;Count&lt;/em&gt; state
&lt;/h3&gt;

&lt;p&gt;Now we have to find a way to change the count state so that the url of the image being rendered changes. So to do this we'll create a custom hook called &lt;strong&gt;useInterval&lt;/strong&gt;, that sets an interval, and clears that interval when it's unmounted.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;callback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;//Can read new state and props&lt;/span&gt;
        &lt;span class="nf"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="c1"&gt;//when count is already greater than our array size go back to the first index.&lt;/span&gt;
        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;previousCount&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;gallery&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;useInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;timer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;setInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;clearInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;timer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nf"&gt;useInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running this you will notice that interval isn't cleared as desired, this is because the clearInterval and the setInterval have a mismatch. In a not shell the setInterval kind of runs twice, while clearInterval cleans up only one interval. This keeps on repeating as the intervals change. &lt;/p&gt;

&lt;h3&gt;
  
  
  How Can We Solve this ??
&lt;/h3&gt;

&lt;p&gt;The best way to solve the issue is to create a react ref that will point to an interval and it's that referenced interval that will be cleared.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;useInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;//create my reference object&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;savedCallback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;//after every render save the newest callback our reference object&lt;/span&gt;
            &lt;span class="nx"&gt;savedCallback&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;callback&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Why useEffect??
&lt;/h3&gt;

&lt;p&gt;We do this because we want to address the newest interval. &lt;/p&gt;

&lt;h3&gt;
  
  
  What Next??
&lt;/h3&gt;

&lt;p&gt;Now all that's let to do is to use the new interval above in our setInterval. And when the interval runs out clear it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;useInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;//create my reference object&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;savedCallback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;//after every render save the newest callback our reference object&lt;/span&gt;
            &lt;span class="nx"&gt;savedCallback&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;callback&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;

        &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;tick&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;//call the latest timer &lt;/span&gt;
            &lt;span class="nx"&gt;savedCallback&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;current&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;timer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;setInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tick&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;clearInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;timer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  What If We Want to be able to Pause/Play our interval??
&lt;/h3&gt;

&lt;p&gt;To realise this we'll need to make our useInterval a little bit more dynamic. We'll initialise a new state called &lt;strong&gt;isRunning&lt;/strong&gt; that will tell our hook if to run the interval or not.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;isRunning&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setIsRunning&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;useInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;//create my reference object&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;savedCallback&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useRef&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="c1"&gt;//after every render save the newest callback our reference object&lt;/span&gt;
        &lt;span class="nx"&gt;savedCallback&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;current&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;callback&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;

        &lt;span class="nf"&gt;useEffect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;tick&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="c1"&gt;//call the latest timer &lt;/span&gt;
                &lt;span class="nx"&gt;savedCallback&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;current&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;

            &lt;span class="cm"&gt;/*Using delay instead of isRunning because useEffect won't trigger a re-render when a boolean changes
            Whereas delay here is a parameter which isn't a boolean, and changes depending on isRunning state. 
            */&lt;/span&gt;
            &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;delay&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;timer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;setInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;tick&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;clearInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;timer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;delay&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nf"&gt;useInterval&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;callback&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;isRunning&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="mi"&gt;5000&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So now if we want to play/pause the interval all we have to do is mutate the is running state.&lt;/p&gt;

&lt;p&gt;Congratulations you made it to the end. Now you have a functional carousel app in react.&lt;/p&gt;

</description>
      <category>react</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
