<?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 Niharika Patil on Medium]]></title>
        <description><![CDATA[Stories by Niharika Patil on Medium]]></description>
        <link>https://medium.com/@niharika.patil?source=rss-72f7ae3079ec------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rYKmAVj9DY6RxrKEhWneyQ.jpeg</url>
            <title>Stories by Niharika Patil on Medium</title>
            <link>https://medium.com/@niharika.patil?source=rss-72f7ae3079ec------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 25 May 2026 11:02:19 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@niharika.patil/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[Statistics Part 1 — Variables]]></title>
            <link>https://medium.com/@niharika.patil/statistics-part-1-variables-9677cd8edd68?source=rss-72f7ae3079ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/9677cd8edd68</guid>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[variables]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Niharika Patil]]></dc:creator>
            <pubDate>Tue, 18 Feb 2025 10:07:03 GMT</pubDate>
            <atom:updated>2025-02-18T10:07:03.982Z</atom:updated>
            <content:encoded><![CDATA[<h3>Statistics Part 1 — Variables</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*Db2zgwWMFbWITrxUdQ-eZg.png" /></figure><p>In machine learning, we often hear terms like input variables and output variables. These terms are the foundation of machine learning, but this foundation is derived from mathematics and statistics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/304/1*etdTdy_zlZzIqk6d8dnfUw.png" /><figcaption>Machine learning is lost without variables — literally!!</figcaption></figure><p>As the name suggests, variables have varying values. They help us measure stuff (quantify things). For example, our <strong>age</strong> is a variable — it keeps changing every year and influences various observations about us.</p><h3>Wait — Isn’t data the foundation of machine learning?</h3><p>Data isn’t just random numbers — it’s a collection of variables where each variable represents something measurable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/0*9ItVIZ_doH9S856f" /></figure><blockquote><em>Variables record information for analysis, adding meaning to data by measuring different aspects of whatever we are studying.</em></blockquote><p>In machine learning, we use data to train models, and this data consists of input variables.</p><p>Mathematically, variables are generally classified into two types when explaining a hypothesis, i.e. Independent and Dependent Variables.</p><h3>Hypothesis</h3><blockquote>My observation is that coffee with music generally makes me write much better code.</blockquote><p>This is a hypothesis — a guess or explanation of why sometimes my code is flawless. It’s an assumption I can test, to see if there’s any relationship between coffee, music, and code quality.</p><h3>But how?</h3><p>We need data for this and data can be collected in terms of these variables. To understand variables better, let’s see the ones for this hypothesis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*oabOcd7ZMMxgA669QoUuCw.png" /><figcaption>Welcome to the reality of my life — independent variables deciding my code quality! ☕💀</figcaption></figure><h3>Independent Variables</h3><ul><li>Their values don’t depend on anything else.</li><li>Factors like coffee, sleep, and music are independent as they exist on their own and aren’t affected by anything.</li><li>They are the cause of some effect — in our example, they influence coding quality.</li><li>They are sometimes called predictor variables because they help predict outcomes (dependent variables).</li></ul><h3>Dependent Variables</h3><ul><li>Their value depends on other factors.</li><li>They are affected by changes in independent variables like coffee, sleep, and music.</li><li>They are called outcome variables — in our example, <strong>coding quality</strong> changes based on the independent variables.</li></ul><p>Now that this is clear, we can further break down variables into two types:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_MEu-2gim26UHzGVAVTGSQ.png" /><figcaption>Breaking down variables: Continuous vs. Discrete, and their subtypes!</figcaption></figure><h3>Discrete Variables</h3><p>These variables are made up of categories and take fixed values (whole numbers), generally countable numbers.</p><h4>Types of discrete variables:</h4><ol><li><strong>Binary Variables: </strong>Can take only two values: Yes/No, True/False, Male/Female. The C<strong>offee</strong> and M<strong>usic </strong>columns in our table are binary variables.</li><li><strong>Nominal:</strong> These variables have more than two categories with no meaningful order. If in our table we had a column (variable) for M<strong>usic Genre</strong> (rock, pop, jazz) that would be nominal.</li><li><strong>Ordinal:</strong> These variables also have more than two categories that have meaningful order but the value differences aren’t measurable. The <strong>Coding Quality</strong> column (dependent variable) is ordinal as it has 3 categories which can be ordered as low, medium, and high. The differences between these values are not numerically defined.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*91dPi_4xv62QGJkUb_nqAg.png" /></figure><h3>Continuous Variables</h3><p>These variables can take on any value on the measurement scale we are using. They are measurable and can have decimals.</p><h4>Types of continuous variables:</h4><ol><li><strong>Interval:</strong> They are similar to ordinal variables, but the difference between two values is meaningful. However, there is no true zero i.e. 0 doesn’t mean “nothing”. If C<strong>oding Quality </strong>were rated on a scale of 1–5, it would be an interval variable, as the gap between each rating is meaningful (the difference between 3 and 4 is the same as between 4 and 5).</li><li><strong>Ratio: </strong>They are interval variables but with a true zero, i.e. none of the quantity or nothing of the following exists. If the S<strong>leep</strong> column has zero then it means 0 hours of sleep/ no sleep at all. So it has a true and meaningful zero point.</li></ol><p>Understanding variables is essential to machine learning, as they help quantify and analyze relationships that drive predictions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9677cd8edd68" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React-Django QuickStart #2]]></title>
            <link>https://medium.com/@niharika.patil/react-django-quickstart-2-4ed8bfec8eb2?source=rss-72f7ae3079ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ed8bfec8eb2</guid>
            <category><![CDATA[frontend-development]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react-bootstrap]]></category>
            <dc:creator><![CDATA[Niharika Patil]]></dc:creator>
            <pubDate>Mon, 29 Jan 2024 14:12:20 GMT</pubDate>
            <atom:updated>2024-02-04T13:48:52.251Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello guys, this is the second part of my React-Django series.</p><blockquote>If you want to know how to make a React, you can check the first part of the series:</blockquote><blockquote><a href="https://medium.com/@patilniharika2306/react-django-quickstart-1-e032c345946d">React-Django QuickStart #1. This is a tutorial to get you started… | by Niharika Patil | Jan, 2024 | Medium</a></blockquote><p>This blog is going to be a quick run through of how-to setup TailwindCSS and React-Bootstrap in ReactJS and some issues that are commonly encountered while setting it up.</p><figure><img alt="Light and Dark Mode in React Web Application with Tailwind CSS" src="https://cdn-images-1.medium.com/proxy/1*6kX5D75l04BSZ6llEd9qWQ.png" /></figure><h3>So let’s dive right into TailwindCSS setup first.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/0*hDnINdx373K3x_vh.jpg" /><figcaption>TailwindCSS has been my best discovery.</figcaption></figure><blockquote><strong><em>Note on installation location:</em></strong></blockquote><blockquote>Also, before we go on with the setup, I would like you guys to note that you need to do the installations inside the React App folder where the src , node_modules , and other folders and files are present. PLS do not install it outside the React App folder.</blockquote><blockquote>A lot of beginners make this mistake. There are times when I still conveniently forget to write the command cd frontend (my react app’s name) and install it outside .</blockquote><h4><strong>Step1 — Is always installation😆.</strong></h4><p>npm install -D tailwindcss postcss autoprefixer</p><p><em>-D indicates that these are development dependencies as in needed mostly during development.</em></p><blockquote>TailwindCSS is a CSS framework.</blockquote><blockquote>PostCSS and autoprefixer are generally included to allow effective use of tailwindcss.</blockquote><h4>Step2 — Creating tailwindcss configuration file.</h4><p>Many people do this manually, but why take the effort to make a new file and then copy and paste the configurations when you have a simple command for it?</p><p>npx tailwindcss init -p</p><p>This command creates two configuration files. One is tailwind.config.js and other is postcss.config.js.</p><p>Both the files contain configurations for TailwindCSS and PostCSS, respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c2i18Ndyb1B65hpi_1yaog.png" /><figcaption>CMD snapshot</figcaption></figure><h4>step3 — Changes in the tailwind configuration file.</h4><p>In the tailwind.config.js, we modify the content line:</p><p>content: [“./src/**/*.{js, jsx, ts, tsx}”]</p><p>This modification specifies that TailwindCSS styles should be applied to .js and .ts files found inside the src folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YxiptkBvfV0bcKKGldntbA.png" /><figcaption>Line 3 shows the changes made</figcaption></figure><h4>Step4 —Make changes in the index.css file.</h4><p>We add the code below at the top of the index.css file.</p><pre>@tailwindcss base;<br>@tailwindcss components;<br>@tailwindcss utilities;</pre><p>These lines integrate TailwindCSS base styles, components, and utilities into our project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A1uuVHHL25Y5WbY5GKgLjA.png" /></figure><h3><strong>Next, lets setup React-Bootstrap.</strong></h3><blockquote><strong><em>Style Conflicts</em></strong></blockquote><blockquote>Honestly, using both TailwindCSS and React-Bootstrap is a headache when you are just starting cus styles override each other from both packages and when you are just getting to know things and errors starting to come up, mind you, they are not even errors, just a frustrating piece of code that should work perfectly fine cus you have done exactly as they told you in the tutorial but here we are, it is not working.</blockquote><blockquote>I will show you guys one such very common error, but not an error once the installations are complete that I had difficulty solving at first.</blockquote><h4>Step1 — Installation</h4><p>npm install react-bootstrap bootstrap</p><p>React-bootstrap provides pre-built Bootstrap components as React Components. This makes it easier to integrate Bootstrap components in React application.</p><p>Bootstrap is what provides the core Bootstrap framework.</p><blockquote>It’s like Bootstrap and on top of that we have React-Bootstrap in simpler terms.</blockquote><h4>Step2 — Make changes in index.js</h4><p>Above all imports in index.js add this</p><p>import ‘bootstrap/dist/css/bootstrap.min.css’;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lZSH6l0qoRNrbQcNuw3cKA.png" /><figcaption>This line imports the minified Bootstrap CSS file, ensuring the necessary styles for Bootstrap components are included.</figcaption></figure><blockquote>Let’s check if the packages installed work the way they should or not?</blockquote><h4>Step 1 — Go to App.js:</h4><p>Remove everything and let the structure below be present only.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qOvQdz_NaRXUb40seUYAOw.png" /><figcaption>App.js structure snapshot</figcaption></figure><p><strong>A little explanation about the code first:</strong></p><p>import ‘./App.css’; — We are just importing the styles from App.css so they can be applied to elements in this file.</p><p>function App() { — We are defining the App component as a function.</p><p>React defines components in two ways:</p><ol><li>Class Components</li><li>Functional Components</li></ol><blockquote>Functional components are way easier to work (in my experience, which btw isn’t much🥲). I have never quite understood class components as they are so complex. But you guys are free to explore them. I would mostly work with functional components only.</blockquote><pre>  return (<br>    &lt;&gt;<br>    <br>    &lt;/&gt;<br>  );</pre><p>This is the body of the App function. In React, components return the elements that are to be rendered to the browser (DOM technically).</p><p>So, this return holds the components we want to be displayed on the web page.</p><p>export default App;</p><p>This exports the App component as the default export from this module. So, when we import this module elsewhere, we can use import App from &#39;./App&#39;; to use the App component.</p><h4>Step 2 — Check React-Bootstrap first:</h4><p>Let’s add a simple button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9ELqqzVelnKtq5yJVQdDiw.png" /><figcaption>Select the 2nd Button it will automatically import React-Bootstrap Button component.</figcaption></figure><p>Let’s make a container around the button.</p><pre>import { Button, Container } from &#39;react-bootstrap&#39;;<br>import &#39;./App.css&#39;;<br><br>function App() {<br>  return (<br>    &lt;Container&gt;<br>      &lt;Button&gt;<br>        Hello<br>      &lt;/Button&gt;<br>    &lt;/Container&gt;<br>  );<br>}<br><br>export default App;</pre><h4>Step 3 — Start React App:</h4><p>Next open the React App path in CMD and run npm start to start the React App.</p><p>In <a href="http://lcoalhost:3000/">http://lcoalhost:3000/</a> we can see the button showing.</p><p>There is a slight error here, so don’t start wondering what you did wrong. Once TailwindCSS is checked I’ll tell you about the error.</p><h4>Step 4 — TailwindCSS check:</h4><p>In the Container element, add the TailwindCSS style:</p><pre>&lt;Container className=&#39;bg-rose-500&#39;&gt;</pre><p>This will set the background-color of the Container element to a pink (rose) shade.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DghgsphWYAEvFthIYMwfMA.png" /><figcaption>App.js snapshot</figcaption></figure><blockquote>Note:</blockquote><blockquote>If you are using VSCode, you should install the extension for TailwindCSS. It will provide suggestions for className which is very helpful.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y4Z66Yfh9Ddb4LtvSzneNQ.png" /><figcaption>TailwindCSS extension</figcaption></figure><p>TailwindCSS and React-Bootstrap work fine if this is what you get on your browser:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yk6YlKIl9zLh8BwbD02FHQ.png" /><figcaption>React-Bootstrap and TailwindCSS are working fine if this what is showing on your browser.</figcaption></figure><h3>Now the <strong>ERROR🫥</strong></h3><blockquote>Some of you may have guessed that this is an error but not an error. You guys are absolutely right.</blockquote><p>The default styles were clashing when we rendered the React-Bootstrap Button.</p><p>TailwindCSS base styles applied to the application set the button background to be transparent.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wfaFQv-aF9ecajJ0hP_AHQ.png" /><figcaption>This is how it may have looked when we tested React-Bootstrap.</figcaption></figure><p>Finding the fix for this was really difficult as there are many fixes to this problem.</p><p>The simplest fix is to move the bootstrap import from line 1 to line 7, which is below all the other imports or more specifically, below import ‘./index.css’; where we added the tailwind base styles if you remember.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M9aY1FgTJnEutJ_WUOVZ5g.png" /><figcaption>index.js changes.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*li8s05eu0yQhYTtJjvWl2g.png" /><figcaption>Line 1 in index.css shows the addition of tailwind base styles.</figcaption></figure><p>See, changing the order works absolutely fine for starters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W_HlDhcpeOHfZNFBbnl8Gw.png" /><figcaption>The button shows the way it should.</figcaption></figure><p>But then, due to this order change, Bootstrap styles are rendered before TailwindCSS and some of my Tailwind styles don’t work the way I want them to.</p><blockquote>I don’t like this because my applications have more TailwindCSS classes than Bootstrap components. I generally prefer to only add the bootstrap components rather than coding them myself and then style them the way I want.</blockquote><p>So, what I do is let the bootstrap import be on Line 1 only and rather do the following:</p><pre>import { Button, Container } from &#39;react-bootstrap&#39;;<br>import &#39;./App.css&#39;;<br><br>function App() {<br>  return (<br>    &lt;Container className=&#39;bg-rose-500&#39;&gt;<br>      &lt;Button className=&#39;bg-blue-300&#39;&gt;<br>        Hello<br>      &lt;/Button&gt;<br>    &lt;/Container&gt;<br>  );<br>}<br><br>export default App;</pre><p>It changes the background-color of the Button component.</p><blockquote>Honestly, you want your app to be appealing (at​least I like making the UI super attractive). That is why, rather than using the basic styles, we style it in different ways, so this fix works for me.</blockquote><h3>Note on Vulnerabilities:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s8Sz9ul2mX7GDi2WBDg9kg.png" /></figure><p>Now, after installation you guys may have seen 8 vulnerabilities being shown when all you have done is installation only.</p><p>When I first started with ReactJS I did try the npm audit fix — force.</p><blockquote>How I wish back then someone would have told me not to do this cus going ahead it will only create more problems😭.</blockquote><p>Forcing npm audit to fix the vulnerabilities will break the application as it will install versions of packages that are not compatible with the application.</p><p>This is a very common issue; a lot of people have faced it.</p><p>What npm audit does is it raises <strong>false positives,</strong> so if you want to check if there are any serious issues or not you can follow the following steps:</p><h4>Step 1 — Open the package.json file:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OxZU_i60x5Qc_txHbmWrIA.png" /><figcaption>This is how the package.json file looks</figcaption></figure><h4>Step 2 — Make changes to package.json:</h4><p>On line 13 of the snapshot, you can see -</p><p>“react-scripts”: “5.0.1”,</p><p>We remove this from “dependecies” and add it to “devDependencies”.</p><p>“devDependencies” can be found at the bottom of the package.json if it is not present, then make it and react-scripts to it -</p><pre> &quot;devDependencies&quot;: {<br>    &quot;react-scripts&quot;: &quot;5.0.1&quot;<br>  }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*joUdnbFGr4gg2qNEvFR0tw.png" /><figcaption>This is how it looks in package.json</figcaption></figure><h4>Step 3 — Run npm audit 😋:</h4><p>In CMD run the following command:</p><p>npm audit --production</p><p>The newer version of this command is:</p><p>npm audit — omit=dev</p><p>If either of the commands show you vulnerabilities after adding react-scripts to devDependencies then they are a serious issue. But only the installation of packages will not raise any serious vulnerabilities (hopefully).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Yx92WzVTlBEBq3lJv-gXA.png" /><figcaption>This is how it should look.</figcaption></figure><p>In the next blog I’ll be showing you how to do a real project. The project is not going to be something simple and basic (okay maybe the basic part is not true here).</p><p>Now that we have installed TailwindCSS we are going to <strong>try</strong> to make an attractive UI.</p><p><em>If you guys are facing any errors whose fix is/was difficult to find you can mail them to me. I would like to add them to my upcoming blogs.</em></p><p><em>You can send the errors through </em><a href="https://www.linkedin.com/in/niharika-patil-211a84226/"><em>LinkedIn</em></a><em> too.</em></p><p><em>Email: patilniharika2306@gmail.com</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ed8bfec8eb2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React-Django QuickStart #1]]></title>
            <link>https://medium.com/@niharika.patil/react-django-quickstart-1-e032c345946d?source=rss-72f7ae3079ec------2</link>
            <guid isPermaLink="false">https://medium.com/p/e032c345946d</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Niharika Patil]]></dc:creator>
            <pubDate>Sat, 20 Jan 2024 10:08:01 GMT</pubDate>
            <atom:updated>2024-01-20T10:08:01.024Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HFuQM9wq0iKGqFb_A13QPA.png" /><figcaption>Seated in React: A Journey from Beginner to Builder</figcaption></figure><p>This is a tutorial to get you started in React and Django. Honestly, when I started, there was a lot of material on ReactJS but not much about how to work with both React and Django.</p><p>I started learning React and Django last year, and the best way to learn is to start a project rather than focusing a lot on the theoretical part. Not that we shouldn’t know about theory, but looking at the practical counterpart helps in grasping the concepts faster <em>(Honestly, the theoretical stuff, even I’m still not on terms with it🥲).</em></p><p>My blogs (<em>yes, like multiple blogs around React; idk how I’m going to come up with so much content, but this is a start)</em> are going to be very specific to React and Django, and to style the React frontend, I’ll mostly use Tailwind CSS and React Bootstrap.</p><h3>Let’s get started…</h3><p>So, for starting a React app, we need Node.js and npm. Install Node.js from <a href="https://nodejs.org/">the official website</a>.</p><blockquote>Node.js is a JavaScript runtime, i.e., it allows us to run JavaScript code on our computer.</blockquote><p>Node Package Manager (npm) is a package manager for JavaScript. It allows us to install, share, and manage external packages — basically the tools and libraries needed for developing web applications. Installing Node.js automatically installs npm.</p><blockquote>It is a very convenient way of accessing packages. One small command and boom you have the whole tool ready for access.</blockquote><p>I mostly use VSCode as my editor, but you guys are free to use whatever you are comfortable with.</p><h3>Create-React-App</h3><blockquote>Global installation (in my suggestion, do not use this method)</blockquote><p>This is the command you use for creating new React projects. Whenever you go, like I have to create a new project which is like most of the time (<em>not the I-have-new-idea kinda new project but more like the old-project-has-so-many-errors-that-i-cannot-even-figure-out</em><strong><em>-</em></strong><em>what-exactly-went-wrong-so-lets-start-anew kinda new project).</em></p><p>It’s a command-line tool. For those starting in React, you guys will have to install this utility.</p><p>Open cmd once Node.js is installed and type this command.</p><pre>npm install -g create-react-app</pre><p>CRA (create-react-app) is what sets up a new React project for you with default configurations.</p><p>Once it is done you can go to any folder you want to create the new React project in. So, like when I started React, I never understood how I was supposed to open a particular folder path in cmd. Should I just go like cd some/path? Then a friend told me about this…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*fWR4AXnHPVX02NKzwDOt-w.jpeg" /><figcaption>Opens that folder path in cmd</figcaption></figure><p>We can also open VSCode for this folder. Once cmd for this folder path opens just type the command <em>(this is just something extra, okay? 😅)</em></p><pre>code .</pre><p>Now, once the folder path for where you want to make your React project is open in the cmd you use the command-line tool.</p><pre>create-react-app nameofyourapp</pre><p>This is the workflow with a global installation.</p><blockquote>Using <em>npx</em> (this is a better a way to create react apps)</blockquote><p>In simple words, npx is a command-line tool that helps us use tools like create-react-app without installing them permanently on our computer.</p><pre>npx create-react-app nameofyourapp</pre><p><em>nameofyourapp I usually use </em><em>frontend as the app name.</em></p><p>When we use npx create-react-app frontend, it fetches the latest version of create-react-app from the npm registry and runs it, creating a new React.js project in your current directory.</p><h3>Run React App</h3><p>Next, we move into the project folder.</p><pre>cd frontend</pre><p>And start the development server here.</p><pre>npm start</pre><p>The development server is what hosts our React application, allowing us to interact with and view various web components in a web browser. It is used to quickly launch a local server and work on the application in a development environment.</p><h3>Project Structure</h3><p>I did say that I’m not going to go into the theoretical part, but understanding the project structure generated by the CRA is kind of important too 😣😥.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f3tWeL7MuJnCVF8sE0Z7kg.png" /><figcaption>This is what is found inside the folder.</figcaption></figure><h4>node_modules folder:</h4><p>This contains all the third-party packages and libraries on which our project depends. CRA adds all the default ones initially when a project is created. But if you want to use something like Tailwind CSS, we install it, and that dependency is added to this folder.</p><h4>src folder:</h4><p>The src folder holds the source code of our React application, including all the pieces (components) used to build the application.</p><p>It has the following files:</p><ol><li>index.js: Starting point of the app.</li><li>App.js: This is the main component that will get displayed when we run the command npm start. App component is the one that gets called in index.js.</li><li>index.css: Contains the global styles that apply to the whole application.</li></ol><h4>public folder:</h4><p>The public folder holds static files that can be used directly, without any processing.</p><p>It is the place where we put things that don’t change or get transformed during the build process of your React app.</p><blockquote>The build process involves packaging up your React app for deployment. It involves transforming and optimizing your source code and assets into a format that’s efficient for browsers to understand and load quickly.</blockquote><h4>package.json and package-lock.json:</h4><p>These files store metadata about the project and its dependencies.</p><h3>Last Note…</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xmBPu3T-DSrwlOIMCO1TqQ.jpeg" /><figcaption>React is not a framework!!!</figcaption></figure><blockquote>ReactJS is a JavaScript library, not a framework.</blockquote><p>The key difference between the terms is in terms of flexibility.</p><p>Library provides various sets of tools, basically a collection of tools, and these tools can be individually used for specific tasks.</p><p>Framework can be seen as a pre-defined structure that dictates how our entire application should be organized and operated.</p><p>Think of Lego pieces using different pieces to create a castle or house, whatever you like using these pieces. Framework can be seen as a predesigned castle building workbook that provides us with the instructions to build this castle. When we follow the instructions, we create a castle, and we can customize certain parts only.</p><blockquote>Angular is a framework.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e032c345946d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>