<?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: Monisha Kumari</title>
    <description>The latest articles on Forem by Monisha Kumari (@monisha_kumari_caf9064898).</description>
    <link>https://forem.com/monisha_kumari_caf9064898</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%2F3770238%2Fa3c6f56d-9f98-41ad-a693-153f9084945b.png</url>
      <title>Forem: Monisha Kumari</title>
      <link>https://forem.com/monisha_kumari_caf9064898</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/monisha_kumari_caf9064898"/>
    <language>en</language>
    <item>
      <title>How to Build a Fast and Modern Quiz App using React.js and Vite</title>
      <dc:creator>Monisha Kumari</dc:creator>
      <pubDate>Sat, 14 Feb 2026 09:37:40 +0000</pubDate>
      <link>https://forem.com/monisha_kumari_caf9064898/how-to-build-a-fast-and-modern-quiz-app-using-reactjs-and-vite-5e90</link>
      <guid>https://forem.com/monisha_kumari_caf9064898/how-to-build-a-fast-and-modern-quiz-app-using-reactjs-and-vite-5e90</guid>
      <description>&lt;p&gt;Hey, are you planning to create a simple school project using React Js? If yes, then you are at the right place. &lt;/p&gt;

&lt;p&gt;This blog focuses on an easy way to build a quiz app for beginners using powerful React.js and Vite with modern development practices. &lt;br&gt;
React is efficient for handling the UI, and Vite offers a lightning-fast development experience. &lt;/p&gt;

&lt;p&gt;Let’s walk through the project's technical implementation in simple steps and a clean structure. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why use Vite with React&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;React is a JavaScript library built around CBA (Component-Based Architecture). It is a huge ecosystem that offers easy state management for projects like quizzes, interactive apps and more. &lt;/p&gt;

&lt;p&gt;Benefits of React &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Faster startup time &lt;/li&gt;
&lt;li&gt;Better performance with minimal configuration &lt;/li&gt;
&lt;li&gt;Lightning fast Hot Module Replacement (HMR)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Project Overview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The quiz app includes an interface with multiple-choice questions and a final score at the end. &lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;Tech Stack&lt;/strong&gt; of this project is React. Js, Vite, Javascript, css. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Setup&lt;/strong&gt;&lt;br&gt;
Given below are the steps to set up the Vite+React project. Open the terminal and start with these steps.&lt;/p&gt;

&lt;p&gt;npm create vite@latest quiz_&lt;/p&gt;

&lt;p&gt;Next, select &lt;strong&gt;React&lt;/strong&gt; from the framework list and &lt;strong&gt;JavaScript&lt;/strong&gt; from the variant list. &lt;/p&gt;

&lt;p&gt;cd quiz_&lt;br&gt;
npm install &lt;br&gt;
npm run dev &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Folder Structure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The scalability and maintenance of the project become easy when the folder structure is simple and clean. For instance, the quiz questions are stored in a different file. In this project, it is in&lt;br&gt;&lt;br&gt;
//src/data/questions.js. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fq9k5hcvze03a1uiic80i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fq9k5hcvze03a1uiic80i.png" alt=" " width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Core App Logic&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;React’s useState hook is used to handle quiz logic. In this project, the &lt;strong&gt;const&lt;/strong&gt; keyword is used declare variables.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fhnnxsv6y4z8k7oybb6uu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fhnnxsv6y4z8k7oybb6uu.png" alt=" " width="800" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next is handling the answer click. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fl75m98xzqribuachp28d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fl75m98xzqribuachp28d.png" alt=" " width="800" height="557"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Below is the code to handle the next click.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fyzksq353pxpi1bo7b0na.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fyzksq353pxpi1bo7b0na.png" alt=" " width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Last is the reset button to run the quiz again from the start (question 1).&lt;br&gt;
&lt;a href="https://media2.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%2Fxe9xf19wv8re7o2p5n22.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fxe9xf19wv8re7o2p5n22.png" alt=" " width="716" height="616"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Styling the App&lt;/strong&gt; &lt;br&gt;
In this project, CSS is used to style the app in a modern way.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fqphlpdf7yk37629sxd02.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fqphlpdf7yk37629sxd02.png" alt=" " width="716" height="616"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance Optimization&lt;/strong&gt; &lt;br&gt;
The quiz app is built using component reusability and using keys in the lists properly. Also, this app has light weight build because of Vite.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;br&gt;
This quiz app is the perfect example that you can use React + Vite to build interactive apps. It can be easily upgraded by adding features like timers, authentication, categories, and more. &lt;/p&gt;

&lt;p&gt;For detailed code, feel free to visit &lt;a href="https://github.com/Monisha9999/quiz_" rel="noopener noreferrer"&gt;https://github.com/Monisha9999/quiz_&lt;/a&gt; and access the code for free. &lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>react</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
