<?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: Tatyana Effa</title>
    <description>The latest articles on DEV Community by Tatyana Effa (@tyanae).</description>
    <link>https://dev.to/tyanae</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%2F1064043%2Faf89a24e-8a27-490c-bced-241e71abd776.jpeg</url>
      <title>DEV Community: Tatyana Effa</title>
      <link>https://dev.to/tyanae</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tyanae"/>
    <language>en</language>
    <item>
      <title>VUE ROUTER: EASY STEPS TO ADDING ROUTING TO YOUR VUE APPLICATION</title>
      <dc:creator>Tatyana Effa</dc:creator>
      <pubDate>Thu, 15 Jun 2023 22:24:12 +0000</pubDate>
      <link>https://dev.to/tyanae/vue-router-easy-steps-to-adding-routing-to-your-vue-application-30o9</link>
      <guid>https://dev.to/tyanae/vue-router-easy-steps-to-adding-routing-to-your-vue-application-30o9</guid>
      <description>&lt;p&gt;Adding routing to your Vue application can be a bit of a hassle, particularly if you are new to Vue.js. I will be sharing a straightforward method to implement routing in this blog post using Vue CLI&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up:
&lt;/h2&gt;

&lt;p&gt;The easiest way to get started with setting up routing in your Vue application is by creating a new project using Vue CLI and have CLI set up routing for you.&lt;/p&gt;

&lt;p&gt;To get started, open your terminal or command prompt and follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the directory where you want to create your new project. In this example, we will create the project in the Documents folder. You can change the directory path according to your preference.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd Documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fog9dz9rl5um25tqs5gu1.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%2Fog9dz9rl5um25tqs5gu1.png" alt="changing dircetory"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Once you have done this, use the following command to create a new Vue project named "my-router" (you can replace "my-router" with your preferred project name):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vue create my-router
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Vue CLI will prompt you to select a preset for your project. Scroll down to "manually select features" and press Enter. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fticc9yefqu40i035exq6.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%2Fticc9yefqu40i035exq6.png" alt="select features"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By choosing the "Manually select features" option, you'll have more control over your Vue project. This allows you to handpick the specific features and plugins you want to include in your project, including routing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After selecting the "Manually select features" option, a prompt will appear with a list of features to choose from. Scroll down using the arrow keys until you reach the "Router" option. Press the space bar to select it, indicated by a filled checkbox.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Next, scroll down to the "Linter" option and press the space bar to unselect it, indicated by an empty checkbox.&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%2Flyiev9azdhdiv5ad6xx1.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%2Flyiev9azdhdiv5ad6xx1.png" alt="select"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have made these selections, press Enter to proceed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The next prompt will ask you to choose a version. Select the latest version by scrolling down and highlighting it, then press Enter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ik0ssp1komaa8kp5lhb.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%2F2ik0ssp1komaa8kp5lhb.png" alt="select version"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Following that, Vue CLI will ask if you want to use history mode for the router. Reply with "Y" to choose yes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fegwdvhjmozywxu6kvd4z.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%2Fegwdvhjmozywxu6kvd4z.png" alt="history mode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Next, you will be prompted to select the configuration file format. Select the default config file by pressing Enter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fitij2764gbjw10p9gexh.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%2Fitij2764gbjw10p9gexh.png" alt="config"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;next select no "N' to saving it as a preset. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyr7a2eln3mpmw8jw359x.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%2Fyr7a2eln3mpmw8jw359x.png" alt="preset"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Press enter and you will generate your vue application&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%2Fyewrk3mz2bqtw3pb2umm.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%2Fyewrk3mz2bqtw3pb2umm.png" alt="vue app"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you open your newly generated Vue application in VS Code, you will find that the router has been set up for you. You can now personalize it to meet your specific needs and requirements.&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%2Fyh1zh8m5vn65osvqqx1s.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%2Fyh1zh8m5vn65osvqqx1s.png" alt="vscode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you found this blog post helpful, I would love to hear from you! Drop a comment below! Share your thoughts, feedback, or any additional tips and tricks you have discovered along the way. &lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
      <category>vue</category>
      <category>router</category>
      <category>routing</category>
    </item>
    <item>
      <title>Ultimate Guide to Responsive WordPress Websites with Elementor: Creating Unique Laptop and Mobile Homepages</title>
      <dc:creator>Tatyana Effa</dc:creator>
      <pubDate>Wed, 31 May 2023 19:37:38 +0000</pubDate>
      <link>https://dev.to/tyanae/ultimate-guide-to-responsive-wordpress-websites-with-elementor-creating-unique-laptop-and-mobile-homepages-c6f</link>
      <guid>https://dev.to/tyanae/ultimate-guide-to-responsive-wordpress-websites-with-elementor-creating-unique-laptop-and-mobile-homepages-c6f</guid>
      <description>&lt;p&gt;Website responsiveness has become an important factor for success. It's crucial to ensure your website delivers an exceptional experience across all devices. In this tutorial, I will explore the world of responsive design using the powerful Elementor page builder for WordPress. &lt;/p&gt;

&lt;p&gt;To provide a practical example, I will guide you through the process of redesigning the laptop version of the All Things Savvy website (&lt;a href="https://www.atsavvy.com"&gt;https://www.atsavvy.com&lt;/a&gt;). While the mobile version required minimal adjustments, our main focus will be on selecting a different laptop version that enhances the overall user experience. &lt;/p&gt;

&lt;p&gt;By the end of this tutorial, you'll be equipped with the knowledge and skills to plan and create unique laptop and mobile homepages that adapt flawlessly to different screen sizes and devices. Let's dive in and unlock the potential of responsive design with Elementor!&lt;/p&gt;

&lt;h2&gt;
  
  
  Planning Your Laptop and Mobile Homepages:
&lt;/h2&gt;

&lt;p&gt;Before delving into the technical aspects, it's essential to approach the planning of your laptop and mobile homepages thoughtfully. Take the time to decide on the overall design you want to implement, carefully curate images, and consider the written content to shape the desired look and feel. To facilitate my design process, I personally found Canva Pro to be an invaluable tool. With Canva Pro, I could easily create and customise images that perfectly complement both the laptop and mobile versions of the website.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started with Elementor:
&lt;/h2&gt;

&lt;p&gt;To begin, log in to the backend of your WordPress website by visiting "&lt;a href="https://yoursite.com/wp-admin"&gt;https://yoursite.com/wp-admin&lt;/a&gt;". Once logged in, it's essential to ensure that you have the Elementor plugin installed. If you don't have it yet, follow these steps to install it seamlessly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install the Plugin:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Scroll down the dashboard menu on the left-hand side.&lt;/li&gt;
&lt;li&gt;Hover your cursor over "Plugins". A small menu will pop up.&lt;/li&gt;
&lt;li&gt;Click on "Add New Plugin".
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZVcGFCzd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pw65cxzoraah7tu4c4lv.png" alt="Screenshot showing plugins" width="321" height="115"&gt;
&lt;/li&gt;
&lt;li&gt;You'll be redirected to a section where you can add a new plugin.&lt;/li&gt;
&lt;li&gt;In the search bar, type "Elementor" and click on the "Install" button next to the Elementor Website Builder plugin.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mFQXjjO4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qi2iepfut09k4dq2mrxy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mFQXjjO4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qi2iepfut09k4dq2mrxy.png" alt="Screenshot showing how to install elementor" width="800" height="237"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the installation is complete, you're ready to start creating.&lt;/p&gt;

&lt;h2&gt;
  
  
  Designing the Homepage:
&lt;/h2&gt;

&lt;p&gt;Once you have successfully installed the Elementor plugin, it's time to dive into designing your homepage.&lt;/p&gt;

&lt;p&gt;To begin, navigate to your homepage by following these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Locate and click on the "Pages" option in the dashboard menu.&lt;/li&gt;
&lt;li&gt;In the small menu that appears, select the "All Pages" option and click on it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9tiXOfuw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i7yhylk1fnhogvgektkh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9tiXOfuw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i7yhylk1fnhogvgektkh.png" alt="pages" width="166" height="118"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will be directed to a page displaying all the pages on your website, including your homepage. From here, you can proceed with editing and customising your homepage.&lt;/p&gt;

&lt;p&gt;Locate the homepage, and then click on "Edit with Elementor" to enter the page editing interface.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CRX_tizC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywqs9i76wtcyus1h0rr2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CRX_tizC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ywqs9i76wtcyus1h0rr2.png" alt="edit with elementor" width="498" height="75"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Responsive Mode: Enabling Device-Specific Editing
&lt;/h3&gt;

&lt;p&gt;To effectively customize your website for different device sizes, it's crucial to enable responsive mode in Elementor. This feature allows you to toggle between various device views and visualize how your edits will appear on different screens. To access responsive mode, follow these steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Locate the Responsive Mode Button:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Look for the responsive mode button in the lower left corner of your Elementor editor's menu.&lt;/li&gt;
&lt;li&gt;Click on the button, and a top bar will appear, displaying different device options.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ASgLiOlA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0zkvz2vsgu6v2nrhgp7w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ASgLiOlA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0zkvz2vsgu6v2nrhgp7w.png" alt="responsive button" width="284" height="38"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Select the Desired Device:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the top bar, you'll find a list of device icons representing different screen sizes, such as desktop, tablet, and mobile.&lt;/li&gt;
&lt;li&gt;Click on the device icon you want to edit for, and the editor will switch to the corresponding view.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NF9MpTCh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ewt5vafq4g1fdzo1tpc3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NF9MpTCh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ewt5vafq4g1fdzo1tpc3.png" alt="select device" width="800" height="25"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Editing Sections:
&lt;/h3&gt;

&lt;p&gt;Website sections play a crucial role in organizing and structuring the layout of a webpage. Each section serves a specific purpose and contains related content. Common examples of website sections include the Header, Hero Section, About Us Section, and Footer.&lt;/p&gt;

&lt;p&gt;I will be changing most of the sections of the laptop view.&lt;/p&gt;

&lt;p&gt;To begin editing the sections, follow these steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Add a New Section:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on the "Add" button located at the top of your existing sections.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VAiSeBGY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zu9ggd24t31litnjh6bq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VAiSeBGY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zu9ggd24t31litnjh6bq.jpg" alt="new section" width="581" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If your page doesn't have any content yet, you'll see a bar in the middle of the page with options to add a new section.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XEZ6jTtV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fsqrkmc4ogl5lrplw7e0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XEZ6jTtV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fsqrkmc4ogl5lrplw7e0.png" alt="new section" width="800" height="115"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Drag and Drop:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To customize your sections, Elementor provides a convenient drag-and-drop functionality. This allows you to effortlessly position and arrange various widgets within your added sections.&lt;/p&gt;

&lt;p&gt;Here's how you can make use of the drag-and-drop feature:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select a Widget:
Open the Elementor menu and browse through the available widgets.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2vyynxLg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mc486zyei5tj08prwzry.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2vyynxLg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mc486zyei5tj08prwzry.png" alt="select a widget" width="273" height="572"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, let's say you want to add an image widget. Simply locate the image widget in the Elementor menu.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Drag and Drop the Widget:
Click and hold the widget you want to add (in this case, the image widget).
While still holding the mouse button, drag the widget to the desired section where you want to place it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6YDHW0K0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tobek06sjrr4vcfupj9l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6YDHW0K0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tobek06sjrr4vcfupj9l.png" alt="drag and drop widget" width="800" height="259"&gt;&lt;/a&gt;&lt;br&gt;
Release the mouse button to drop the widget into the section.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Edit the Image:
After dropping the image widget into the section, the image edit menu will appear.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dUV_O-5U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0wcvncvocl5e34p3txak.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dUV_O-5U--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0wcvncvocl5e34p3txak.jpg" alt="edit image" width="800" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can now proceed to add your desired image to the widget.&lt;br&gt;
Choose an image from your media library by selecting the appropriate option.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cejj9G16--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dz77ru8m1lkby2rzzaz7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cejj9G16--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dz77ru8m1lkby2rzzaz7.png" alt="add image" width="674" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alternatively, if you want to upload a new image, click on the "Upload Files" button and follow the prompts to upload the image.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yuY7N6uh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0kbcmrdfmg99jxffu7ya.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yuY7N6uh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0kbcmrdfmg99jxffu7ya.jpg" alt="upload image" width="800" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Responsive:
&lt;/h4&gt;

&lt;p&gt;Congratulations on your progress so far! You have successfully added a new section, dragged and dropped an image widget, and uploaded an image. Now, it's time to adjust the visibility of your new section based on different devices. Since this section was designed for the laptop view, we will configure the settings to show it only on laptops, hiding it on mobile and tablet devices.&lt;/p&gt;

&lt;p&gt;To accomplish this, follow these steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make sure your desired section is still open in the Elementor editor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Access Responsive Settings:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At the top of the Elementor menu, you will find three edit options: Content, Style, and Advanced.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nXsSNOL9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lwneyk3ned1sfx273f6a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nXsSNOL9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lwneyk3ned1sfx273f6a.png" alt="edit image" width="271" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on "Advanced" to access advanced settings.&lt;/li&gt;
&lt;li&gt;Scroll down within the Advanced settings until you find the "Responsive" section.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9W7sEox2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1nrttz86vnl87bhru3fk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9W7sEox2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1nrttz86vnl87bhru3fk.png" alt="responsive" width="254" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click on it to expand the options.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Configure Visibility:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Within the Responsive settings, you will see three options: "Hide on Desktop," "Hide on Tablet," and "Hide on Mobile."&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select your preferred options based on the desired visibility for your section. In this case, we want to hide the section on tablet and mobile devices.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K3usJHfr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pe5bk4repbw742xj3gmm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K3usJHfr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pe5bk4repbw742xj3gmm.png" alt="hide sections" width="255" height="233"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Remember, if you encounter empty sections that appear after hiding certain sections, it's essential not to delete them. These empty-looking sections are placeholders and removing them will affect the overall structure of your website.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9VSGiLNy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y9mick7xt0ojpkxo3rbq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9VSGiLNy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y9mick7xt0ojpkxo3rbq.jpg" alt="empty sections" width="800" height="175"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By following these steps, you can adjust the visibility of your sections to ensure they appear only on the appropriate devices. In this case, the sections designed for mobile view will be hidden when viewed on a laptop and vice versa. Repeat these steps for other sections as needed, customizing the visibility based on your design requirements.&lt;/p&gt;

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

&lt;p&gt;In this blog post, we explored the importance of responsive design and how to achieve it using Elementor. We discussed the benefits of having a responsive WordPress website and walked through the process of designing laptop and mobile homepages. With Elementor's drag-and-drop functionality and responsive settings, you can create stunning and adaptable websites. By optimizing performance and testing your design, you ensure a seamless user experience. Embrace the power of Elementor and craft websites that shine on any device. &lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>elementor</category>
      <category>responsive</category>
      <category>webdev</category>
    </item>
    <item>
      <title>HOW TO SETUP A REACT APPLICATION WITH ROUTER, NESTED ROUTES, ERROR HANDLING, AND CONTEXT</title>
      <dc:creator>Tatyana Effa</dc:creator>
      <pubDate>Thu, 13 Apr 2023 23:01:53 +0000</pubDate>
      <link>https://dev.to/tyanae/how-to-setup-a-simple-react-application-325h</link>
      <guid>https://dev.to/tyanae/how-to-setup-a-simple-react-application-325h</guid>
      <description>&lt;p&gt;In this article I will show you how to set up a simple react application with the following implemented: React-router, Nested routes, 404 page, and Error boundary. Fake userAuthContext using the context API to always carry out a fake authentication. Navigation menu that will show on each page.&lt;/p&gt;

&lt;p&gt;Link to this application &lt;a href="https://my-exam-project-teffa.netlify.app"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TABLE OF CONTENTS
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Pre-requisites&lt;/li&gt;
&lt;li&gt;Getting Started With Your App&lt;/li&gt;
&lt;li&gt;What Is React?&lt;/li&gt;
&lt;li&gt;Setting Up React&lt;/li&gt;
&lt;li&gt;Components&lt;/li&gt;
&lt;li&gt;React-Router&lt;/li&gt;
&lt;li&gt;404 Page &amp;amp; Error Boundary&lt;/li&gt;
&lt;li&gt;404 Page&lt;/li&gt;
&lt;li&gt;Error Boundary
10.Fake UserAuthContext Using Context Api
11.Conclusion&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Pre-requisites
&lt;/h2&gt;

&lt;p&gt;To understand this blog post, you need to have basic knowledge of the following:&lt;br&gt;
HTML&lt;br&gt;
CSS&lt;br&gt;
JavaScript&lt;br&gt;
React Js&lt;/p&gt;
&lt;h3&gt;
  
  
  APPLICATIONS USED:
&lt;/h3&gt;

&lt;p&gt;Vscode&lt;br&gt;
Github&lt;br&gt;
Netlify&lt;br&gt;
N/B: I used a MacBook to setup this application. Downloading dependencies on windows may be a bit different.&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting Started With Your App
&lt;/h2&gt;

&lt;p&gt;To get started you need to set up and download all dependencies.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Node JS – nodejs.org&lt;/li&gt;
&lt;li&gt;VS Code Editor – code.visualstudio.com/download&lt;/li&gt;
&lt;li&gt;Prettier Code Formatter Extension in VS Code&lt;/li&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;React Router&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When Node Js is installed, it comes with a package manager called npm, which allows you access to bits of code that other developers have already written. To check if both Node.js and npm were installed successfully, open up your terminal and simply type the following code below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node -v
npm -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your code runs and shows you the version of both npm and Node.js, it means installation was successful.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is React?
&lt;/h2&gt;

&lt;p&gt;React is an open source JavaScript front-end framework . It is used for building fast and interactive user interfaces for the web, as well as mobile apps.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting Up React
&lt;/h3&gt;

&lt;p&gt;You have all the dependencies installed, open your terminal and follow the steps below:&lt;br&gt;
Change directory into the folder you want your project to be in. I used a Documents folder&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd Documents
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a new directory for your app in your Documents folder&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Change directory to the new folder you created with the code above&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd ReactApp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create your react app with the code below, give it your own app name. I used “myreactapp”&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npx create-react-app myreactapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you have successfully created a react application. Follow this next step&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd myreactapp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a shortcode that opens your new application in Vs Code automatically.&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;Components&lt;/p&gt;

&lt;p&gt;Go to your src folder and create a components folder. Create all the components for your application with the necessary linking.&lt;/p&gt;

&lt;h2&gt;
  
  
  React-Router
&lt;/h2&gt;

&lt;p&gt;To install, go to your terminal and type the code below:&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@6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our app has 4 pages we would be routing: Home page, About Page, Login Page and an Error Page. Create Components for each page.&lt;br&gt;
Open you App.js file in VS Code and import BrowserRouter, Route and Routes&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, Route, Routes } from "react-router-dom";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Route all the components that require routing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function App() {
  return (
    &amp;lt;section&amp;gt;
        &amp;lt;BrowserRouter&amp;gt;
          &amp;lt;Routes&amp;gt;
            &amp;lt;Route path="/" element={&amp;lt;Home /&amp;gt;}  /&amp;gt;  
            &amp;lt;Route path="/Login" element={&amp;lt;Login /&amp;gt;} /&amp;gt;
            &amp;lt;Route path="/About" element={&amp;lt;About /&amp;gt;} /&amp;gt;
            &amp;lt;Route path="/Error" element={&amp;lt;Error /&amp;gt;} /&amp;gt;
            &amp;lt;Route path="*" element={&amp;lt;PageNotFound /&amp;gt;}  /&amp;gt;  
          &amp;lt;/Routes&amp;gt;
        &amp;lt;/BrowserRouter&amp;gt;
    &amp;lt;/section&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  404 Page &amp;amp; Error Boundary
&lt;/h2&gt;

&lt;h3&gt;
  
  
  404 Page
&lt;/h3&gt;

&lt;p&gt;A 404 page is known as an “error page” or “page not found” page. It is usually indicative of a page that doesn’t exist. It is important to create a 404 page on your website with the necessary information and link to re-direct visitors, so they don’t lose interest.&lt;br&gt;
Start by creating a “PageNotFound.js” component, route it in your app.js, as shown in the code above.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from "react";
import sad from ".//image/sad.PNG";
import { Link } from "react-router-dom";

export default function PageNotFound() {
  return (
    &amp;lt;section className="notfound-container"&amp;gt;
      &amp;lt;div className="content-container"&amp;gt;
        &amp;lt;img src={sad} alt="sad" /&amp;gt;
        &amp;lt;h1&amp;gt;404 Error&amp;lt;/h1&amp;gt;
        &amp;lt;p&amp;gt;Page Not Found&amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;
          The page you are looking for doesn't exist or an error occured. 
          &amp;lt;p&amp;gt;&amp;lt;Link to="/"&amp;gt;Go back to home page&amp;lt;/Link&amp;gt;&amp;lt;/p&amp;gt;
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/section&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Error Boundary
&lt;/h3&gt;

&lt;p&gt;Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed. Error boundaries catch errors during rendering, in lifecycle methods, and in 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;class ErrorBoundary extends React.Component {
    constructor(props) {
      super(props);
      this.state = { hasError: false };
    }

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

    componentDidCatch(error, errorInfo) {}

    render() {
      if (this.state.hasError) {
        return &amp;lt;h1&amp;gt;Something went wrong.&amp;lt;Link to='/'&amp;gt;Go back to home page&amp;lt;/Link&amp;gt;&amp;lt;/h1&amp;gt;;
      }

      return this.props.children;
    }
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wrap your app in the ErrorBoundary tag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function App() {
  return (
    &amp;lt;section&amp;gt;
      &amp;lt;ErrorBoundary&amp;gt;
        &amp;lt;BrowserRouter&amp;gt;
          &amp;lt;Routes&amp;gt;
            &amp;lt;Route path="/" element={&amp;lt;Home /&amp;gt;} /&amp;gt;
            &amp;lt;Route path="/Login" element={&amp;lt;Login /&amp;gt;} /&amp;gt;
            &amp;lt;Route path="/About" element={&amp;lt;About /&amp;gt;} /&amp;gt;
            &amp;lt;Route path="/Error" element={&amp;lt;Error /&amp;gt;} /&amp;gt;
            &amp;lt;Route path="*" element={&amp;lt;PageNotFound /&amp;gt;} /&amp;gt;
          &amp;lt;/Routes&amp;gt;
        &amp;lt;/BrowserRouter&amp;gt;
      &amp;lt;/ErrorBoundary&amp;gt;
    &amp;lt;/section&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Fake UserAuthContext Using Context Api
&lt;/h2&gt;

&lt;p&gt;In this section we will be creating a login page that provides the implementation for authenticating users.&lt;br&gt;
Create a AuthUser.js component and implement 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;import { createContext, useState, useContext} from "react";

const userAuthContext = createContext({});

export const AuthUser = ({ children }) =&amp;gt; {
  const [auth, setAuth] = useState({});

  return (
    &amp;lt;userAuthContext.Provider value={{ auth, setAuth }}&amp;gt;
      {children}
    &amp;lt;/userAuthContext.Provider&amp;gt;
  );
};

export default userAuthContext;

export const useAuth = () =&amp;gt; {
    return useContext(userAuthContext)
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your Login.js component, create a login form. UseState is used to create the state of the page. After login, the user gets to see their login details and a link that redirects you to the homepage.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from "react";
import { useState, useContext } from "react";
import { Link } from "react-router-dom";
import userAuthContext from "./Context/AuthUser";
import Navigation from "./Navigation";

const Login = () =&amp;gt; {
  // eslint-disable-next-line no-unused-vars
  const { setAuth } = useContext(userAuthContext);
  const [user, setUser] = useState("");
  const [pwd, setPwd] = useState("");
  const [success, setSuccess] = useState(false);

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

    setSuccess(true);
  };

  return (
    &amp;lt;&amp;gt;
      &amp;lt;div&amp;gt;
        &amp;lt;header&amp;gt;
          &amp;lt;Navigation /&amp;gt;
        &amp;lt;/header&amp;gt;
      &amp;lt;/div&amp;gt;
      {success ? (
        &amp;lt;section&amp;gt;
          &amp;lt;h3&amp;gt;
            You are logged in as, &amp;lt;span&amp;gt;{user}&amp;lt;/span&amp;gt;.
          &amp;lt;/h3&amp;gt;
          &amp;lt;br /&amp;gt;
          &amp;lt;p&amp;gt;
            &amp;lt;Link className="link" to="/"&amp;gt;
              Go to home page
            &amp;lt;/Link&amp;gt;
          &amp;lt;/p&amp;gt;
        &amp;lt;/section&amp;gt;
      ) : (
        &amp;lt;div className="main"&amp;gt;
          &amp;lt;div className="sub-main"&amp;gt;
            &amp;lt;div className="imgs"&amp;gt;
              &amp;lt;div className="container-image"&amp;gt;
                &amp;lt;img src={loginimg} alt="loginimg" className="profile" /&amp;gt;
              &amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;

            &amp;lt;div className="logginn-container"&amp;gt;
            &amp;lt;h1&amp;gt;Login Page&amp;lt;/h1&amp;gt;
            &amp;lt;form onSubmit={handleSubmit}&amp;gt;
              &amp;lt;div&amp;gt;
                &amp;lt;input
                  type="text"
                  id="username"
                  placeholder="Enter Username"
                  className="name"
                  autoComplete="off"
                  onChange={(e) =&amp;gt; setUser(e.target.value)}
                  value={user}
                  required
                /&amp;gt;
              &amp;lt;/div&amp;gt;

              &amp;lt;div&amp;gt;
                &amp;lt;input
                  type="password"
                  id="password"
                  placeholder="Enter Password"
                  className="name"
                  onChange={(e) =&amp;gt; setPwd(e.target.value)}
                  value={pwd}
                  required
                /&amp;gt;
              &amp;lt;/div&amp;gt;
              &amp;lt;div className="button-container"&amp;gt;
                &amp;lt;button className="login-button"&amp;gt;Log In&amp;lt;/button&amp;gt;
              &amp;lt;/div&amp;gt;
            &amp;lt;/form&amp;gt;
          &amp;lt;/div&amp;gt;

          &amp;lt;/div&amp;gt;

        &amp;lt;/div&amp;gt;
      )}
    &amp;lt;/&amp;gt;
  );
};
export default Login;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;Great job on getting to the end of this blog post. You can now create a simple react application that implements React-router, Nested routes, 404 page, and Error boundary etc. With practice you would be able to do it yourself without any help.&lt;br&gt;
To view a life demo of this project, click here, you can also find the source code on Github.&lt;br&gt;
Share you thoughts in the comments.&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
