<?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: Kingsley Ihemelandu</title>
    <description>The latest articles on Forem by Kingsley Ihemelandu (@kingsleydaprime).</description>
    <link>https://forem.com/kingsleydaprime</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%2F1083683%2Fedd3d384-bd20-4aed-8a39-b05e9bf943b0.jpg</url>
      <title>Forem: Kingsley Ihemelandu</title>
      <link>https://forem.com/kingsleydaprime</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/kingsleydaprime"/>
    <language>en</language>
    <item>
      <title>Getting Started with Vite and React</title>
      <dc:creator>Kingsley Ihemelandu</dc:creator>
      <pubDate>Tue, 16 May 2023 10:12:53 +0000</pubDate>
      <link>https://forem.com/kingsleydaprime/getting-started-with-vite-and-react-1cgc</link>
      <guid>https://forem.com/kingsleydaprime/getting-started-with-vite-and-react-1cgc</guid>
      <description>&lt;p&gt;If you're looking for a fast, lightweight way to start a React project, look no further than Vite. Vite is a build tool that makes it easy to set up a development environment for modern web applications. In this tutorial, we'll walk through the steps to create a React project using Vite.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we dive in, make sure you have Node.js and npm installed on your system. You can check if you have these installed by running the following commands in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;node &lt;span class="nt"&gt;--version&lt;/span&gt;
npm &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you don't have Node.js or npm installed, head over to the &lt;a href="https://nodejs.org/" rel="noopener noreferrer"&gt;official website&lt;/a&gt; to download and install the latest version.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a New Project
&lt;/h2&gt;

&lt;p&gt;To get started, create a new directory for your project and navigate to it in your terminal. Then, run the following command to create a new React project using Vite:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm init vite@latest my-react-app &lt;span class="nt"&gt;--template&lt;/span&gt; react
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create a new React project in the my-react-app directory using the react template. The react template includes everything you need to get started with React, including a basic component and some sample code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running the Project
&lt;/h2&gt;

&lt;p&gt;Once your project is set up, navigate to the project directory and run the following command to start the development server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will launch the development server and open your project in your default web browser. You can now start making changes to your project and see the changes live in your browser.&lt;/p&gt;

&lt;p&gt;And that's it! With Vite and React, you can quickly and easily create fast, responsive web applications for the world to see. Happy coding!&lt;/p&gt;

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