<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Thamodaran on Medium]]></title>
        <description><![CDATA[Stories by Thamodaran on Medium]]></description>
        <link>https://medium.com/@kthamodaran?source=rss-ab000d57c2c6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*rS1BRxwlNI_oPTGo</url>
            <title>Stories by Thamodaran on Medium</title>
            <link>https://medium.com/@kthamodaran?source=rss-ab000d57c2c6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 20:57:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kthamodaran/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Vite + React + Setup]]></title>
            <link>https://medium.com/@kthamodaran/vite-react-setup-c921191d7b59?source=rss-ab000d57c2c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/c921191d7b59</guid>
            <category><![CDATA[scratch]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[codebase]]></category>
            <category><![CDATA[setup]]></category>
            <category><![CDATA[vites]]></category>
            <dc:creator><![CDATA[Thamodaran]]></dc:creator>
            <pubDate>Fri, 18 Aug 2023 06:04:15 GMT</pubDate>
            <atom:updated>2023-08-18T06:46:00.373Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CQLVprfpDWfpzoG0tEp9iw.png" /></figure><h3>Vite + React + Setup</h3><p><a href="https://vitejs.dev/">Vite</a> is a build tool that aims to provide faster and more streamlined development workflow for web applications. When used with <a href="https://reactjs.org/">React</a>, it provides a powerful combination for building complex and performant web applications. In this section, we will go through the setup process for using Vite with React.</p><h3>Prerequisites</h3><p>Before starting the setup process, we need to make sure that we have <a href="https://nodejs.org/en/">Node.js</a> and <a href="https://www.npmjs.com/">npm</a> installed in our system.</p><h3>Creating a new React project with Vite</h3><p>To create a new React project with Vite, we can use the command provided by Vite.</p><pre>npm init vite@latest my-code-base --template react</pre><p>This command will create a new React project in the my-code-base directory using the react template provided by Vite. The react template includes all the necessary configuration files and dependencies for developing a React application with Vite.</p><h3>Running the development server</h3><p>To start the development server, we can use the following command:</p><pre>cd my-code-base<br>npm run dev</pre><p>This command will start the development server at http://localhost:3000. We can open this URL in a web browser to see our React application running.</p><h3>Building for production</h3><p>To build our React application for production, we can use the following command:</p><pre>npm run build</pre><p>This command will create a production-ready build of our React application in the dist directory.</p><h3>Conclusion</h3><p>Using Vite with React provides a powerful and efficient way of developing web applications. With its fast and optimised development workflow, Vite can help developers create high-performance React applications with ease.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c921191d7b59" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React 8 — best practices + Folder Structure]]></title>
            <link>https://medium.com/@kthamodaran/react-8-best-practices-folder-structure-5dbda48a69e?source=rss-ab000d57c2c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dbda48a69e</guid>
            <category><![CDATA[react-hook]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[import-export]]></category>
            <category><![CDATA[react-folder-structure]]></category>
            <category><![CDATA[react-best-practices]]></category>
            <dc:creator><![CDATA[Thamodaran]]></dc:creator>
            <pubDate>Tue, 01 Aug 2023 03:41:43 GMT</pubDate>
            <atom:updated>2023-08-01T03:41:43.848Z</atom:updated>
            <content:encoded><![CDATA[<h3>React Js — 8 best practices + Folder Structure</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uDCOdExJwBLgncupng49uw.jpeg" /><figcaption>React Js</figcaption></figure><p>1. Directory structure</p><p>2. Focus on common modules</p><p>3. Add custom components in folders</p><p>4. Create custom hooks</p><p>5. Use absolute imports</p><p>6. Avoid a single context for everything</p><p>7. Separate business logic from UI</p><p>8. Use the utils directory</p><h3>1. Directory structure</h3><p>The most important advantage of this folder structure is developers cab can grasp all the files that belong to a feature at once. Plus, it’s easier to maintain the code and reuse it as per their needs.</p><p><strong>Example</strong></p><p>React project has a source (src) folder where all the files and folders get listed, as shown below. The focus should also be on component-centric file structure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6bwaBeN-ZCEnPAr7sIbyw.png" /><figcaption>Folder structure</figcaption></figure><h3>2. Focus on common modules</h3><p>React doesn’t enforce a particular way of structuring your code. Therefore, you can divide your modules however you want while building a React application. React framework will assist you in reducing the development complexity and creating open, reusable, and shared structures.</p><p>So you should focus on common modules such as reusable custom components, custom react hooks, business logic, constants, utility functions, etc. You can use these modules right through the software in various components, views, and projects.</p><h3>3. Add custom components in folders</h3><p>Adding custom components in folders helps keep projects organized and easier to navigate. It separates standard components from custom components, making them reusable, accessible, and maintainable, and enhancing scalability.</p><p><strong>Example</strong></p><p>Let’s take an example of a React custom button component. In the component directory, create a new folder named “Button.” Within this nested folder, all the files as shown below:</p><pre>└── /src<br><br>├── /components<br><br>| ├── /Button<br><br>| | ├── Button.js<br><br>| | ├── Button.css<br><br>| | ├── Button.test.js</pre><ul><li><strong>Button.js</strong> comprises all the logic of the custom component.</li><li><strong>Button.css</strong> contains the styled-comonents part.</li><li><strong>Button.test.js</strong> comprises all the test cases.</li></ul><h3>4. Create custom hooks</h3><p>Custom hooks helps you to reduce code complexity. Suppose you have two different web pages called Login and Registration. Both of these pages will have input fields where visitors will enter the required information, and click the submit button at the end.</p><p>If you want the password toggling feature for both these pages, you must write the same code twice. That’s where the role of the custom hook comes into the picture. You can create a custom hook for password toggling, as shown below:</p><pre>└── /src<br>├── /hooks<br>├──usePasswordToggler.js</pre><h3>5. Use absolute imports</h3><p>React application comprises plenty of nested structures, which may lead to confusion when importing any element by default.</p><pre>// some file<br>import { Button } from &#39;../../components&#39;;</pre><p>You can avoid such confusion by adding support for importing modules using absolute paths. For this purpose, you can add a rule to the jsconfig.json file at the root of your project. A jsconfig.json file helps your editor’s Language Server Protocol to comprehend JavaScript or JSX (A JavaScript Extension).</p><p>Here’s an example of how jsconfig.json can help:</p><pre>{<br>&quot;compilerOptions&quot;: {<br>&quot;baseUrl&quot;: &quot;src&quot;<br>},<br>&quot;include&quot;: [&quot;src&quot;]<br>}</pre><p>With a rule added to the jsconfig.json file, you can import components located at /src/components with the following coding snippet:</p><pre>import { Button } from &#39;components&#39;;</pre><h3>6. Avoid a single context for everything</h3><p>One of the most common problems in a React application is figuring out how to share the current state across multiple components. The complexity can multi-fold when several components exist between a parent and child component, requiring the passing of render props between them.</p><p>React Context is essential for transmitting data via component tree without restoring to default prop drilling. It means a parent component can pass on the props to all the child components beneath. Using multiple contexts in your React application can help you avoid a single point of failure and accomplish various tasks effectively.</p><h3>7. Separate business logic from UI</h3><p>To enhance the quality of your source code and make software maintenance a breeze, you should separate business logic from UI. The main component i.e., UI should get stored in the /pages or /views directory. Building custom hooks can help you to solve this problem. You can also use the React Query library, a custom hook that helps you to fetch, catch and update the content.</p><h3>8. Use the utils directory</h3><p>The utils directory comprises some helper functions that you can use right through your React application. It’s not compulsory to utilize the utils directory. However, it’s recommended as it assists in maintaining a clean code and enhancing software quality.</p><p>So far, we have gone through the nitty-gritty of best practices and folder/structure changes that can help you to create a scalable web application. However, the question still remains-how to create one/what are the steps involved? Let us find out in our next section.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dbda48a69e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create an Carousel Using Basic HTML, CSS, and JavaScript]]></title>
            <link>https://medium.com/@kthamodaran/html-81b54726ac9c?source=rss-ab000d57c2c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/81b54726ac9c</guid>
            <category><![CDATA[slider]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[carousel]]></category>
            <category><![CDATA[html-slider]]></category>
            <dc:creator><![CDATA[Thamodaran]]></dc:creator>
            <pubDate>Sat, 22 Jul 2023 16:14:29 GMT</pubDate>
            <atom:updated>2023-07-22T16:17:59.494Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VONi4DAAb6PIiyJJqVxEEw.png" /><figcaption>Carousel using HTML / CSS / Javascript</figcaption></figure><h3>HTML</h3><blockquote><em>The HTML code will create the content and images for the carousel with the help of DOM elements.</em></blockquote><h3>CSS</h3><blockquote><em>The CSS code will handle the show/hide functionality with the help of class names such as </em><em>.enable, etc.</em></blockquote><h3>Javascript</h3><blockquote><em>The Javascript code will use to add event handler like </em><em>next / </em><em>prev buttons. Will handle </em><em>.enable</em> <em>class using our script.</em></blockquote><h3>Fallow the bellow procedure for implementation</h3><h3>Step 1— Writing the HTML code</h3><pre>&lt;!-- Slideshow container --&gt;<br>&lt;div class=&quot;slideshow-container fade&quot;&gt;<br><br>  &lt;!-- Full images / Content --&gt;<br>  &lt;div class=&quot;Containers&quot;&gt;<br>    &lt;div class=&quot;info&quot;&gt;Slide 1&lt;/div&gt;<br>    &lt;img src=&quot;image1.jpg&quot; style=&quot;width:100%&quot;&gt;<br>    &lt;div class=&quot;Info&quot;&gt;First caption&lt;/div&gt;<br>  &lt;/div&gt;<br><br>  &lt;div class=&quot;Containers&quot;&gt;<br>    &lt;div class=&quot;info&quot;&gt;Slide 2&lt;/div&gt;<br>    &lt;img src=&quot;image2.jpg&quot; style=&quot;width:100%&quot;&gt;<br>    &lt;div class=&quot;Info&quot;&gt;Second Caption&lt;/div&gt;<br>  &lt;/div&gt;<br><br>  &lt;div class=&quot;Containers&quot;&gt;<br>    &lt;div class=&quot;info&quot;&gt;Slide 3&lt;/div&gt;<br>    &lt;img src=&quot;image3.jpg&quot; style=&quot;width:100%&quot;&gt;<br>    &lt;div class=&quot;Info&quot;&gt;Third Caption&lt;/div&gt;<br>  &lt;/div&gt;<br><br>  &lt;!-- Prev and Next buttons --&gt;<br>  &lt;a class=&quot;Back&quot; onclick=&quot;plusSlides(-1)&quot;&gt;&amp;#10094;&lt;/a&gt;<br>  &lt;a class=&quot;forward&quot; onclick=&quot;plusSlides(1)&quot;&gt;&amp;#10095;&lt;/a&gt;<br>&lt;/div&gt;<br>&lt;br&gt;<br><br>&lt;!-- The dots --&gt;<br>&lt;div style=&quot;text-align:center&quot;&gt;<br>  &lt;span class=&quot;dots&quot; onclick=&quot;currentSlide(1)&quot;&gt;&lt;/span&gt;<br>  &lt;span class=&quot;dots&quot; onclick=&quot;currentSlide(2)&quot;&gt;&lt;/span&gt;<br>  &lt;span class=&quot;dots&quot; onclick=&quot;currentSlide(3)&quot;&gt;&lt;/span&gt;<br>&lt;/div&gt; </pre><h3>Step — 2 Writing the CSS code</h3><pre>* {box-sizing:border-box}<br><br>/* Slideshow container */<br>.slideshow-container {<br>  max-width: 1000px;<br>  position: relative;<br>  margin: auto;<br>}<br><br>/* Make the images invisible by default */<br>.Containers {<br>  display: none;<br>}<br><br>/* forward &amp; Back buttons */<br>.Back, .forward {<br>  cursor: pointer;<br>  position: absolute;<br>  top: 48%;<br>  width: auto;<br>  margin-top: -23px;<br>  padding: 17px;<br>  color: grey;<br>  font-weight: bold;<br>  font-size: 19px;<br>  transition: 0.4s ease;<br>  border-radius: 0 5px 5px 0;<br>  user-select: none;<br>}<br><br>/* Place the &quot;forward button&quot; to the right */<br>.forward {<br>  right: 0;<br>  border-radius: 4px 0 0 4px;<br>}<br><br>/*when the user hovers,add a black background with some little opacity */<br>.Back:hover, .forward:hover {<br>  background-color: rgba(0,0,0,0.8);<br>}<br><br>/* Caption Info */<br>.info {<br>  color: #e3e3e3;<br>  font-size: 16px;<br>  padding: 10px 14px;<br>  position: absolute;<br>  bottom: 10px;<br>  width: 100%;<br>  text-align: center;<br>}<br><br>/* Content */<br>.info {<br>  color: #f2f2f3;<br>  font-size: 14px;<br>  padding: 10px 14px;<br>  position: absolute;<br>  top: 0;<br>}<br><br>/* The circles or bullets indicators */<br>.dots {<br>  cursor: pointer;<br>  height: 16px;<br>  width: 16px;<br>  margin: 0 3px;<br>  background: linear-gradient(92.18deg, #a049e9 -25.78%, #6643db 123.02%);<br>  opacity: 0.3;<br>  border-radius: 50%;<br>  display: inline-block;<br>  transition: background-color 0.5s ease;<br>}<br><br>.enable, .dots:hover {<br>  background: linear-gradient(92.18deg, #a049e9 -25.78%, #6643db 123.02%);<br>  opacity: 1;<br>}<br><br>/* Faint animation */<br>.fade {<br>  -webkit-animation-name: fade;<br>  -webkit-animation-duration: 1.4s;<br>  animation-name: fade;<br>  animation-duration: 1.4s;<br>}<br><br>@-webkit-keyframes fade {<br>  from {opacity: .5}<br>  to {opacity: 2}<br>}<br><br>@keyframes fade {<br>  from {opacity: .5}<br>  to {opacity: 2}<br>}</pre><h3>Step 3 — Write the JavaScript code</h3><pre>var slidePosition = 1;<br>SlideShow(slidePosition);<br><br>// forward/Back controls<br>function plusSlides(n) {<br>  SlideShow(slidePosition += n);<br>}<br><br>//  images controls<br>function currentSlide(n) {<br>  SlideShow(slidePosition = n);<br>}<br><br>function SlideShow(n) {<br>  var i;<br>  var slides = document.getElementsByClassName(&quot;Containers&quot;);<br>  var circles = document.getElementsByClassName(&quot;dots&quot;);<br>  if (n &gt; slides.length) {slidePosition = 1}<br>  if (n &lt; 1) {slidePosition = slides.length}<br>  for (i = 0; i &lt; slides.length; i++) {<br>      slides[i].style.display = &quot;none&quot;;<br>  }<br>  for (i = 0; i &lt; circles.length; i++) {<br>      circles[i].className = circles[i].className.replace(&quot; enable&quot;, &quot;&quot;);<br>  }<br>  slides[slidePosition-1].style.display = &quot;block&quot;;<br>  circles[slidePosition-1].className += &quot; enable&quot;;<br>} </pre><h3>Conclusion</h3><p>In this article, we have learned how to create own carousel. In the above example can view various images, content or videos by scrolling left or right.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81b54726ac9c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Chatbot NLP — Chapter 1]]></title>
            <link>https://medium.com/@kthamodaran/chatbot-nlp-chapter-1-7e5ca8f83c41?source=rss-ab000d57c2c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e5ca8f83c41</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[speech-recognition]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[chatbot-development]]></category>
            <category><![CDATA[speech]]></category>
            <dc:creator><![CDATA[Thamodaran]]></dc:creator>
            <pubDate>Fri, 21 Jul 2023 03:26:58 GMT</pubDate>
            <atom:updated>2023-07-21T03:26:58.340Z</atom:updated>
            <content:encoded><![CDATA[<h3>Chatbot NLP — Chapter 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z4c-4p3Wcli4oJ4feeYS7g.png" /></figure><p><strong>Selecting NLP Techniques:</strong></p><p>Various NLP techniques can be used to build a chatbot.</p><p>1. rule-based.</p><p>2. keyword-based.</p><p>3. machine learning-based.</p><p>4. Intent Recognition.</p><p>5. Language Model.</p><p>6. Sentiment Analysis.</p><p>Each technique has strengths and weaknesses, so selecting the appropriate technique for your chatbot is important.</p><p>Various natural language processing (NLP) techniques can be used to build a chatbot, each with its strengths and weaknesses.</p><p><strong>Here are a few examples of NLP techniques:</strong></p><p><strong>1.Rule-based Systems:</strong></p><p>These systems rely on predefined rules to understand and respond to user inputs. They are simple to implement and effective for simple tasks, but they may struggle with more complex inputs.</p><p><strong>2.Keyword-based Systems:</strong></p><p>These systems rely on matching keywords in the user input to predefined responses. They are easy to implement but can be limited in their ability to understand the context and handle more complex inputs.</p><p><strong>3.Machine Learning-based Systems:</strong></p><p>These systems rely on machine learning algorithms to understand and respond to user inputs. They are more complex to implement but can handle complex inputs and improve over time as they learn from more data.</p><p><strong>4.Intent Recognition:</strong></p><p>Identifying the intent behind the user’s input, for example, booking a flight or asking a question, using techniques such as supervised learning, unsupervised learning, or deep learning.</p><p><strong>5.Language Model:</strong></p><p>These models are pre-trained on a large dataset and can be fine-tuned for specific tasks such as language translation, question answering and text summarisation.</p><p><strong>6.Sentiment Analysis:</strong></p><p>Identifying the sentiment or emotion behind a text, such as positive, negative, or neutral, using techniques such as supervised learning or deep learning.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e5ca8f83c41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React With Webpack]]></title>
            <link>https://medium.com/@kthamodaran/react-with-webpack-bca37aad8274?source=rss-ab000d57c2c6------2</link>
            <guid isPermaLink="false">https://medium.com/p/bca37aad8274</guid>
            <category><![CDATA[react-with-webpack]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react-core-concept]]></category>
            <category><![CDATA[react-from-scratch]]></category>
            <dc:creator><![CDATA[Thamodaran]]></dc:creator>
            <pubDate>Wed, 19 Jul 2023 09:48:38 GMT</pubDate>
            <atom:updated>2023-07-19T09:48:38.471Z</atom:updated>
            <content:encoded><![CDATA[<h3>How to create a React application with Webpack</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X6JEK-ward0kFXFXdtCK-A.png" /><figcaption>React &amp; Webpack</figcaption></figure><h3>1. Create a folder and initialize NPM</h3><pre>npm init -y</pre><h3>2. Install the following packages</h3><p>react react-dom and dev dependencies like @babel/core @babel/preset-env @babel/preset-react babel-loader css-loader html-webpack-plugin sass sass-loader style-loader url-loader webpack webpack-cli webpack-dev-server</p><pre>npm i react react-dom</pre><pre>npm i -D @babel/core @babel/preset-env @babel/preset-react babel-loader css-loader html-webpack-plugin sass sass-loader style-loader url-loader webpack webpack-cli webpack-dev-server</pre><h3>3. Create .babelrc file</h3><pre>{<br>  &quot;presets&quot;: [&quot;@babel/preset-env&quot;, &quot;@babel/preset-react&quot;]<br>}</pre><h3>4. Create a webpack.config.js file</h3><pre>const path = require(&quot;path&quot;);<br>const HtmlWebpackPlugin = require(&quot;html-webpack-plugin&quot;);<br><br>module.exports = {<br>  output: {<br>    path: path.join(__dirname, &quot;/dist&quot;), // the bundle output path<br>    filename: &quot;bundle.js&quot;, // the name of the bundle<br>  },<br>  plugins: [<br>    new HtmlWebpackPlugin({<br>      template: &quot;src/index.html&quot;, // to import index.html file inside index.js<br>    }),<br>  ],<br>  devServer: {<br>    port: 3030, // you can change the port<br>  },<br>  module: {<br>    rules: [<br>      {<br>        test: /\.(js|jsx)$/, // .js and .jsx files<br>        exclude: /node_modules/, // excluding the node_modules folder<br>        use: {<br>          loader: &quot;babel-loader&quot;,<br>        },<br>      },<br>      {<br>        test: /\.(sa|sc|c)ss$/, // styles files<br>        use: [&quot;style-loader&quot;, &quot;css-loader&quot;, &quot;sass-loader&quot;],<br>      },<br>      {<br>        test: /\.(png|woff|woff2|eot|ttf|svg)$/, // to import images and fonts<br>        loader: &quot;url-loader&quot;,<br>        options: { limit: false },<br>      },<br>    ],<br>  },<br>};</pre><h3>5. Create an /src folder and create the following files inside it App.js, App.scss, index.html, index.js.</h3><pre>|-- src<br>  |-- App.js<br>  |-- App.scss<br>  |-- index.html<br>  |-- index.js</pre><p>App.js</p><pre>import React from &quot;react&quot;;<br>const App = () =&gt; {<br>  return &lt;h1&gt;React app with Webpack&lt;/h1&gt;;<br>};<br><br>export default App;</pre><p>App.scss</p><pre>h1 {<br>  color: blue;<br>}</pre><p>index.html</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html lang=&quot;en&quot;&gt;<br>  &lt;head&gt;<br>    &lt;meta charset=&quot;UTF-8&quot; /&gt;<br>    &lt;meta http-equiv=&quot;X-UA-Compatible&quot; content=&quot;IE=edge&quot; /&gt;<br>    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot; /&gt;<br>    &lt;title&gt;React with Webpack&lt;/title&gt;<br>  &lt;/head&gt;<br>  &lt;body&gt;<br>    &lt;div id=&quot;app&quot;&gt;&lt;/div&gt;<br><br>    &lt;!-- Notice we are pointing to `bundle.js` file --&gt;<br>    &lt;script src=&quot;bundle.js&quot;&gt;&lt;/script&gt;<br>  &lt;/body&gt;<br>&lt;/html&gt;</pre><p>index.js</p><pre>import React from &quot;react&quot;;<br>import ReactDOM from &quot;react-dom&quot;;<br>import App from &quot;./App&quot;;<br>import &quot;./App.scss&quot;;<br><br>const el = document.getElementById(&quot;app&quot;);<br><br>ReactDOM.render(&lt;App /&gt;, el);</pre><h3>6. Create serve and build scripts</h3><p>Add following code In your package.json file:</p><pre>{<br>  &quot;name&quot;: &quot;react-webpack&quot;,<br>  &quot;version&quot;: &quot;1.0.0&quot;,<br>  &quot;description&quot;: &quot;&quot;,<br>  &quot;main&quot;: &quot;index.js&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;serve&quot;: &quot;webpack serve --mode development&quot;,<br>    &quot;build&quot;: &quot;webpack --mode production&quot;<br>  },<br>  &quot;keywords&quot;: [],<br>  &quot;author&quot;: &quot;&quot;,<br>  &quot;license&quot;: &quot;ISC&quot;,<br>  &quot;dependencies&quot;: {<br>    &quot;react&quot;: &quot;^17.0.2&quot;,<br>    &quot;react-dom&quot;: &quot;^17.0.2&quot;<br>  },<br>  &quot;devDependencies&quot;: {<br>    &quot;@babel/core&quot;: &quot;^7.15.0&quot;,<br>    &quot;@babel/preset-env&quot;: &quot;^7.15.0&quot;,<br>    &quot;@babel/preset-react&quot;: &quot;^7.14.5&quot;,<br>    &quot;babel-loader&quot;: &quot;^8.2.2&quot;,<br>    &quot;css-loader&quot;: &quot;^6.2.0&quot;,<br>    &quot;html-webpack-plugin&quot;: &quot;^5.3.2&quot;,<br>    &quot;sass&quot;: &quot;^1.38.1&quot;,<br>    &quot;sass-loader&quot;: &quot;^12.1.0&quot;,<br>    &quot;style-loader&quot;: &quot;^3.2.1&quot;,<br>    &quot;url-loader&quot;: &quot;^4.1.1&quot;,<br>    &quot;webpack&quot;: &quot;^5.51.1&quot;,<br>    &quot;webpack-cli&quot;: &quot;^4.8.0&quot;,<br>    &quot;webpack-dev-server&quot;: &quot;^4.0.0&quot;<br>  }<br>}</pre><h3>7. Run and modify your app</h3><p>Run the app with npm run serve. Open your browser on http://localhost:3030/. Try to modify it and see the changes.</p><h3>8. Build the app</h3><p>Run npm run build in the terminal. You will see the bellow output:</p><pre>|-- dist<br>  |-- bundle.js<br>  |-- bundle.js.LICENSE.txt<br>  |-- index.html</pre><h3>Conclusion:</h3><p>Open the index.html file and you should see your app.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bca37aad8274" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>