<?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: Joanna Egbuna</title>
    <description>The latest articles on DEV Community by Joanna Egbuna (@joanna911x).</description>
    <link>https://dev.to/joanna911x</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%2F1002003%2F60120b23-38bf-42c7-b933-b6220ece3d02.jpeg</url>
      <title>DEV Community: Joanna Egbuna</title>
      <link>https://dev.to/joanna911x</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/joanna911x"/>
    <language>en</language>
    <item>
      <title>JAVASCRIPT ARRAYS: A BEGINNER'S GUIDE</title>
      <dc:creator>Joanna Egbuna</dc:creator>
      <pubDate>Sat, 12 Aug 2023 11:01:03 +0000</pubDate>
      <link>https://dev.to/joanna911x/javascript-arrays-a-beginners-guide-29gb</link>
      <guid>https://dev.to/joanna911x/javascript-arrays-a-beginners-guide-29gb</guid>
      <description>&lt;h3&gt;
  
  
  INTRODUCTION
&lt;/h3&gt;

&lt;p&gt;JavaScript arrays are data structures that have an important role in modern web development. They provide a way to store and handle collections of data allowing developers to efficiently perform operations. &lt;br&gt;
In this article, we will be covering the creation, manipulation, and iteration of arrays. If you're a beginner this article will assist you in unlocking the potential of arrays in your projects.&lt;/p&gt;
&lt;h3&gt;
  
  
  WHAT ARE ARRAYS
&lt;/h3&gt;

&lt;p&gt;In JavaScript, arrays serve as data structures that enable you to store values within a single variable. These values can encompass any type of data such as numbers, strings, objects, or other arrays. Arrays are extensively used in programming to manage collections of data and offer methods for performing various operations on that data.&lt;/p&gt;
&lt;h3&gt;
  
  
  DECLARING ARRAYS
&lt;/h3&gt;

&lt;p&gt;To declare an array in JavaScript, square brackets &lt;strong&gt;'[]'&lt;/strong&gt; are used. You can initialize an array with values during declaration or create an array and subsequently add values to it. Here are a few examples;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Initializing an array with values
const letters = [a, b, c, d, e];
const numbers = [1, 2, 3, 4, 5];
const animals = ['cat', 'dog', 'rabbit', 'horse'];

// Creating an empty array
const emptyArray = [];

//Creating a mixed array
const mixedArray = [20, 'cat', true, null];

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

&lt;/div&gt;



&lt;h3&gt;
  
  
  ACCESSING ARRAY ELEMENTS
&lt;/h3&gt;

&lt;p&gt;Array elements can be accessed using their index position which begins from '0' for the first element. To access an element, within an array variable simply use brackets followed by the index number. For instance;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const letters = [a, b, c, d, e];

// Accessing an array
const firstLetter = letters[0]; // accesses the first item in the array "a"
const secondLetter = letters[1]; // accesses the second item in the array "b"
const thirdLetter = letters[2]; // accesses the third item in the array "c"

console.log(firstLetter); // prints "a"
console.log(secondLetter); // prints "b"
console.log(thirdLetter); // prints "c"

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

&lt;/div&gt;



&lt;p&gt;Note that if you try to access an index that doesn't exist, you will get &lt;strong&gt;Undefined&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const letters = [a, b, c,];

const fourthLetter = letters[3]; // accessing a non-existent index

console.log(fourthLetter) // output = 'undefined'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  MODIFYING AN ARRAY
&lt;/h3&gt;

&lt;p&gt;You can modify array elements by using their indexes&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const letters = ['a', 'b', 'c', 'd'];

letters[1]= 'z' // modifies the third element from 'b' to 'z'

console.log(letters) // output ['a', 'z', 'c', 'd']

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

&lt;/div&gt;



&lt;p&gt;In conclusion, arrays are important data structures in JavaScript that allow you to store and manage collections of data. They are declared using square brackets, and elements in an array can be accessed and modified using their indexes. Understanding arrays is important for efficient and organized code in programming.&lt;/p&gt;

&lt;p&gt;If you're looking to learn more about array methods and iteration, check out my next article.&lt;/p&gt;

&lt;p&gt;I am open to corrections and suggestions and I hope this article helps you understand arrays better.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Creating a GitHub App with React</title>
      <dc:creator>Joanna Egbuna</dc:creator>
      <pubDate>Tue, 10 Jan 2023 08:15:02 +0000</pubDate>
      <link>https://dev.to/joanna911x/creating-a-github-app-with-react-1l3j</link>
      <guid>https://dev.to/joanna911x/creating-a-github-app-with-react-1l3j</guid>
      <description>&lt;p&gt;As an Examination project, I worked on developing an application using React; &lt;strong&gt;a JavaScript Library for building user interfaces.&lt;/strong&gt; My application fetches my GitHub repositories from the GitHub site and displays them on my App. And I'd like to give you a detailed step-by-step guide and explanation of my project.&lt;/p&gt;

&lt;p&gt;Below is a list of features and functionalities that were implemented on my app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An API fetch of my GitHub portfolio,&lt;/li&gt;
&lt;li&gt;React Router and Nested routes,&lt;/li&gt;
&lt;li&gt;Error boundary and a page to test it,&lt;/li&gt;
&lt;li&gt;A 404 page,&lt;/li&gt;
&lt;li&gt;A page listing all of my repositories on GitHub,&lt;/li&gt;
&lt;li&gt;Another page showing data for a single repo clicked from the list of repositories,&lt;/li&gt;
&lt;li&gt;Pagination for my repository list,&lt;/li&gt;
&lt;li&gt;SEO implementation,&lt;/li&gt;
&lt;li&gt;Lazy loading state.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;p&gt;Some perquisites for getting started on an application like this include&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;A code editor; I'd recommend VS code because it is easy to use, and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A React application already working on your computer. You can check &lt;a href="https://create-react-app.dev/"&gt;this&lt;/a&gt; out for more on creating a React app.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  An API fetch of my GitHub Portfolio
&lt;/h2&gt;

&lt;p&gt;APIs are used in Web applications to connect user-facing front end with all-important back-end functionality and data. In this case, I used an API to fetch data from my GitHub portfolio and display it on my page.&lt;/p&gt;

&lt;p&gt;This was used to call or fetch the data that was displayed on the page.&lt;br&gt;
&lt;/p&gt;

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

useEffect(() =&amp;gt; {
    const link = "https://api.github.com/users/{yourGitHubUsername}/repos";
    const fetchUsers = async () =&amp;gt; {
      const res = await fetch(link);
      const data = await res.json();
      console.log(data);
    };
    fetchUsers();
  }, []);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Setting the Router component
&lt;/h2&gt;

&lt;p&gt;The React Router is used to &lt;strong&gt;define multiple routes in the application.&lt;/strong&gt; When a user types a specific URL into the browser, and if this URL path matches any 'route' inside the router file, the user will be redirected to that particular route.&lt;/p&gt;

&lt;p&gt;In other words, it is used for navigation between pages or components in a React app. It comes in handy when creating a great website.&lt;/p&gt;

&lt;p&gt;To install react-router, you can run the code below in your terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install react-router-dom
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Nested Routes
&lt;/h2&gt;

&lt;p&gt;Just like the name implies, &lt;strong&gt;nested routes are routes nested or embedded in another route.&lt;/strong&gt; They enable you to render multiple components on the same page.&lt;/p&gt;

&lt;p&gt;My app consisted of my landing or home page, repo page, repo details page which is nested inside the repo page, error page, and 404 page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";

&amp;lt;BrowserRouter&amp;gt;
     &amp;lt;Routes&amp;gt;
       &amp;lt;Route path="/" element= {&amp;lt;Navigate to="/home" replace={true}/&amp;gt;} /&amp;gt;
       &amp;lt;Route path="/home" element= {&amp;lt;Home /&amp;gt;} /&amp;gt;
       &amp;lt;Route path="/errorpage" element={&amp;lt;ErrorPage /&amp;gt;} /&amp;gt;
       &amp;lt;Route path="/repos" element={&amp;lt;Repo /&amp;gt;} /&amp;gt;
       &amp;lt;Route path="/repos/:repoId" element={&amp;lt;Details /&amp;gt;} /&amp;gt;
       &amp;lt;Route path="*" element={&amp;lt;NotFound /&amp;gt;} /&amp;gt;
     &amp;lt;/Routes&amp;gt; 
 &amp;lt;/BrowserRouter&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Error Boundary page
&lt;/h2&gt;

&lt;p&gt;Error boundaries are React components that &lt;strong&gt;catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the crashed site&lt;/strong&gt;. Error boundaries catch errors during rendering, in lifecycle methods, and constructors of the whole tree below them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Component } from "react";
import { Link } from "react-router-dom";

export class ErrorBoundary extends Component {
    constructor(props) {
        super(props);
        this.state = { hasError: false };
    }

    static getDerivedStateFromError(error) {
        return { hasError: true };
    }

    componentDidCatch(error, errorInfo) {
        console.log("Logging", error, errorInfo);
    }

    render() {
        if (this.state.hasError) {
            return &amp;lt;&amp;gt;
            &amp;lt;h1&amp;gt;OOPS!! &amp;lt;p&amp;gt;SOMETHING WENT WRONG&amp;lt;/p&amp;gt;&amp;lt;/h1&amp;gt;
            &amp;lt;Link to="/"&amp;gt;Go home&amp;lt;/Link&amp;gt;
            &amp;lt;/&amp;gt;;
        }

        return this.props.children;
    }
}

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

&lt;/div&gt;



&lt;p&gt;After creating the error boundary you wrap it around your entire app or any part of your app that is bound to have errors.&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;ErrorBoundary &amp;gt;
&amp;lt;App /&amp;gt;
&amp;lt;/ErrorBoundary&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  404 page
&lt;/h2&gt;

&lt;p&gt;A 404 page is a page that tells your &lt;strong&gt;users that the page they are looking for doesn't exist on that website.&lt;/strong&gt; This page is displayed to tell the user that they have entered an invalid URL or clicked an invalid or broken link.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Link } from "react-router-dom"

const NotFound = () =&amp;gt; {
  return (

    &amp;lt;div className="not-found"&amp;gt;
      &amp;lt;h2&amp;gt;Sorry&amp;lt;/h2&amp;gt;
      &amp;lt;p&amp;gt;That page cannot be found&amp;lt;/p&amp;gt;
      &amp;lt;Link to="/"&amp;gt;Back to the homepage...&amp;lt;/Link&amp;gt;

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

export default NotFound;

// the route path for this page is
&amp;lt;Route path="*" element={&amp;lt;NotFound /&amp;gt;} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  A page displaying a list of my Repos
&lt;/h2&gt;

&lt;p&gt;A page is needed to display your list of repositories, it could be your landing ie. home page, or different from your homepage. In my case, My repo page was different from my homepage.&lt;/p&gt;

&lt;p&gt;I worked on making my repo page simple like the rest of my website and it displayed only my list of repositories. I decided to display only a few pieces of information about the repositories and a link for further information on a particular repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Link } from react-router-dom

function RepoDetails(props) {
const reposMapped = currentRepos.map((item, index) =&amp;gt; (
    &amp;lt;RepoDetails
      key={item.id}
      title={item.name}
      owner={item.owner.login}
      id={item.id}
      description={item.description}
      Avatar={item.owner.avatar_url}
    /&amp;gt;
  ));
  return (
    &amp;lt;div className="repo-container"&amp;gt;
      &amp;lt;div&amp;gt;
          &amp;lt;img src={props.Avatar} alt="jj" /&amp;gt;
        &amp;lt;h1 className="repo-title"&amp;gt;{props.title}&amp;lt;/h1&amp;gt;
        &amp;lt;div className="owner"&amp;gt;{props.owner}&amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;p&amp;gt;{props.description ? props.description : "No description added"}&amp;lt;/p&amp;gt;

      &amp;lt;Link to={`/repos/${props.title}`} className="more"&amp;gt;
        CHECK OUT REPO
      &amp;lt;/Link&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
export default RepoDetails;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  A single page for your repo details
&lt;/h2&gt;

&lt;p&gt;This page is nested inside the repo page and opens when the user clicks on the &lt;strong&gt;learn more&lt;/strong&gt; button on my repo page. When clicked, it displays more information about a particular repo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Link } from "react-router-dom";

export default function Details() {

 return (
  &amp;lt;&amp;gt;
   &amp;lt;div className="all"&amp;gt;
     &amp;lt;h1 className="repoName"&amp;gt; {repos.name} &amp;lt;/h1&amp;gt;
     &amp;lt;p&amp;gt;LANGUAGE: {repos.language ? repos.language : "No language Used "}&amp;lt;/p&amp;gt;
      &amp;lt;p&amp;gt;DEFAULT BRANCH: {repos.default_branch}&amp;lt;/p&amp;gt;
      &amp;lt;p className="date"&amp;gt;
         CREATED ON {new Date(repos.created_at).toDateString()}
       &amp;lt;/p&amp;gt;
       &amp;lt;p className="date"&amp;gt;
         LAST UPDATE {new Date(repos.updated_at).toDateString()}
        &amp;lt;/p&amp;gt;
       &amp;lt;p&amp;gt;VISIBILITY: {repos.visibility}&amp;lt;/p&amp;gt;
      &amp;lt;button&amp;gt;
         &amp;lt;a className="more" href={repos.html_url}&amp;gt;
            VIEW REPO ON GITHUB
         &amp;lt;/a&amp;gt;
       &amp;lt;/button&amp;gt;
      &amp;lt;button&amp;gt;
         &amp;lt;Link className="more" to="/repos"&amp;gt;
            REPOSITORIES
          &amp;lt;/Link&amp;gt;
       &amp;lt;/button&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/&amp;gt;
  );
}

//route to page
&amp;lt;Route path="/repos/:repoId" element={&amp;lt;Details /&amp;gt;} /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Adding Pagination to my repo page
&lt;/h2&gt;

&lt;p&gt;Pagination in React JS is a &lt;strong&gt;reusable component that allows data to be displayed on a series of pages.&lt;/strong&gt; It helps you to display a large number of records and improve the user experience. Simply put, pagination makes use of links and buttons such as previous, next, and page numbers to navigate through the different pages of the website.&lt;/p&gt;

&lt;p&gt;I worked basically on the previous, next, and page buttons, but I didn't implement the page number buttons on my page, you can add them to yours if you want to.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useEffect, useState } from "react";

function Repos() {
  const [repos, setRepos] = useState([]);
  const [currentPage, setCurrentPage] = useState(1);
  const [perPage] = useState(4);
  const [Loading, setLoading] = useState(true);

  const pagelength = repos.length;
  const indexOfLastRepo = currentPage * perPage;
  const indexOfFirstRepo = indexOfLastRepo - perPage;
  const currentRepos = repos.slice(indexOfFirstRepo, indexOfLastRepo);

  const pageNoArr = [];
  let reposLength = Math.ceil(pagelength / perPage);
  for (let i = 1; i &amp;lt;= reposLength; i++) {
    pageNoArr.push(i);
  }

  const numberOfPage = pageNoArr.map((number) =&amp;gt; {
    return (
      &amp;lt;button
        key={number}
        onClick={(e) =&amp;gt; setCurrentPage(number)}
        className="page-link"
      &amp;gt;
        {number}
      &amp;lt;/button&amp;gt;
    );
  });

  const reposMapped = currentRepos.map((item, index) =&amp;gt; (
    &amp;lt;RepoDetails
      key={item.id}
      title={item.name}
      index={index}
      owner={item.owner.login}
      id={item.id}
      description={item.description}
      Avatar={item.owner.avatar_url}
    /&amp;gt;
  ));

  return (
    &amp;lt;&amp;gt;
      &amp;lt;Helmet&amp;gt;
        &amp;lt;title&amp;gt;JOANNA REPOSITORIES&amp;lt;/title&amp;gt;
        &amp;lt;meta
          name="description"
          content="THIS PAGE DISPLAYS JOANNA'S GITHUB REPOSITORY"
        /&amp;gt;
      &amp;lt;/Helmet&amp;gt;

      {Loading ? (
        &amp;lt;h1&amp;gt; LOADING...&amp;lt;/h1&amp;gt;
      ) : (
        &amp;lt;div className="All"&amp;gt;
          &amp;lt;div className="repo-details"&amp;gt;{reposMapped}&amp;lt;/div&amp;gt;
          &amp;lt;br&amp;gt;&amp;lt;/br&amp;gt;
          &amp;lt;section className="pagination"&amp;gt;
            &amp;lt;button
              className="prev"
              disabled={currentPage &amp;lt;= 1}
              aria-disabled={currentPage &amp;lt;= 1}
              onClick={() =&amp;gt; setCurrentPage((prev) =&amp;gt; prev - 1)}
            &amp;gt;
              PREV
            &amp;lt;/button&amp;gt;
            {/* &amp;lt;div className="page"&amp;gt;{numberOfPage}&amp;lt;/div&amp;gt; */}
            &amp;lt;button
              className="next"
              disabled={currentPage &amp;gt;= reposLength}
              aria-disabled={currentPage &amp;gt;= 1}
              onClick={() =&amp;gt; setCurrentPage((prev) =&amp;gt; prev + 1)}
            &amp;gt;
              NEXT
            &amp;lt;/button&amp;gt;
          &amp;lt;/section&amp;gt;
        &amp;lt;/div&amp;gt;
      )}
    &amp;lt;/&amp;gt;
  );
}

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  SEO Implementation
&lt;/h2&gt;

&lt;p&gt;SEO stands for “search engine optimization.” In simple terms, it means the &lt;strong&gt;process of improving your site to increase its visibility when people search for products or services related to your business&lt;/strong&gt; in any search engine such as Google.&lt;/p&gt;

&lt;p&gt;It attracts prospective viewers, users, and customers to your site or business.&lt;/p&gt;

&lt;p&gt;To implement SEO, you have to install the react-helmet-async package first.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install react-helmet-async

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

&lt;/div&gt;



&lt;p&gt;Next, you import the HelmetProvider and use it to wrap your entire app in your root component.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { HelmetProvider } from "react-helmet-async";

&amp;lt;HelmetProvider&amp;gt;
    &amp;lt;App /&amp;gt;
&amp;lt;/HelmetProvider&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lastly, you'd import the helmet component into every page that needs a description and you add a title and description of your choice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Helmet } from 'react-helmet-async';

&amp;lt;Helmet&amp;gt;
   &amp;lt;title&amp;gt;REPOSITORY VIEW&amp;lt;/title&amp;gt;
     &amp;lt;meta
       name="description"
       content="THIS PAGE HELPS YOU VIEW JOANNA'S REPOSITORIES ON GITHUB"
    /&amp;gt;
 &amp;lt;/Helmet&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Lazy loading state
&lt;/h2&gt;

&lt;p&gt;React Lazy Load is an &lt;strong&gt;easy-to-use React component that helps you defer loading content in a predictable way.&lt;/strong&gt; Lazy loading effectively speeds up an application as it defers loading non-critical components. i.e, a component is loaded only when it is needed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { lazy, Suspense } from "react";
import { ImSpinner7 } from "react-icons/im";

const Home = lazy(() =&amp;gt; import("./pages/Home/Home"));
const ErrorPage = lazy(() =&amp;gt; import("./pages/ErrorPage/ErrorPage"));

&amp;lt;Suspense
  fallback={
    &amp;lt;div className="Loading-state"&amp;gt;
      &amp;lt;ImSpinner7 className="Loading-spinner" /&amp;gt;
    &amp;lt;/div&amp;gt;
  }
&amp;gt;
&amp;lt;Routes /&amp;gt;
&amp;lt;/Suspense&amp;gt;

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

&lt;/div&gt;



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

&lt;p&gt;We learned how to build an application that uses GitHub APIs to fetch your GitHub repositories and display them on a website. We also implemented some necessary and cool features to our app.&lt;/p&gt;

&lt;p&gt;Check out my source code &lt;a href="https://github.com/JoannaAmy/Exam-AltSchool-2"&gt;here&lt;/a&gt; and my &lt;a href="https://exam-alt-school-2.vercel.app/home"&gt;live link&lt;/a&gt; here.&lt;/p&gt;

&lt;p&gt;Don't forget to leave comments and reviews behind for me!!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;T&lt;/em&gt;&lt;/strong&gt; for &lt;strong&gt;T&lt;/strong&gt;hanks!!!&lt;/p&gt;

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