<?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 Shilpa Rai on Medium]]></title>
        <description><![CDATA[Stories by Shilpa Rai on Medium]]></description>
        <link>https://medium.com/@shilparai?source=rss-34282bd3df09------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*DKM0xWmWPFtZ5hSs.</url>
            <title>Stories by Shilpa Rai on Medium</title>
            <link>https://medium.com/@shilparai?source=rss-34282bd3df09------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 03:21:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shilparai/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[React Router]]></title>
            <link>https://medium.com/@shilparai/react-router-bce782c14351?source=rss-34282bd3df09------2</link>
            <guid isPermaLink="false">https://medium.com/p/bce782c14351</guid>
            <dc:creator><![CDATA[Shilpa Rai]]></dc:creator>
            <pubDate>Sat, 02 May 2020 20:16:13 GMT</pubDate>
            <atom:updated>2020-05-02T20:16:13.838Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6c4U_Reu28Lc5UkLQ8qiqw.jpeg" /></figure><h3>Introduction</h3><h3>What is react router?</h3><p><strong>React Router</strong> is a standard library for routing in React. It enables the navigation among views of various components in a React Application, allows changing the browser URL and keeps the UI in sync with the URL.</p><h3>Is react router is static or dynamic?</h3><ul><li>Before the react router v4 it is static after v4 it is Dynamic.</li></ul><p>In single page apps, there is only single html page.we are reusing the same html page to render the different components based on the navigation.</p><p>But in multipage apps, you will get an entirely new page from the server when you navigate.</p><p>When we say dynamic routing, we mean <strong>routing that takes place as your</strong> <strong>app is rendering</strong>, not in a configuration or convention outside of a running app.</p><h3>How to install the react router?</h3><p>we are using the create-react-app to create the app.</p><blockquote><strong>npx create-react-app routing<br>cd routing</strong></blockquote><p>To install the react router you need to download the react-router-dom package by running the following commands.</p><blockquote><strong>npm install react-router-dom</strong></blockquote><blockquote><strong>npm start //to run dev server</strong></blockquote><p>To add React Router components in your application, open your project directory in the editor you use and go to <strong>app.js</strong> file. Now, add the below given code in app.js:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*4MUnth0siSAEBuOFDio-oA.png" /></figure><p><strong>Note:</strong> BrowserRouter is aliased as Router.</p><p>To use React Router, let us first create few components in the react application. In your project directory, create a folder named <strong>component</strong> inside the src folder and now add 3 files named <strong>home.js</strong>, <strong>about.js</strong> and <strong>contact.js</strong> to the component folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/229/1*wdsQv6RZnkNX_-cfdR06Iw.png" /></figure><p>Let us add some code to our 3 components:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*wxta3ao1hg6vntL4kwmgAg.png" /><figcaption>home.js</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/344/1*A-KwriNWXyzQSg2RPYu5JA.png" /><figcaption>about.js</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*gMfufB4akUVpw_lMqPwY5w.png" /><figcaption>contact.js</figcaption></figure><p>Now, let us include React Router components to the application:</p><ul><li><strong>BrowserRouter:</strong> Add BrowserRouter aliased as Router to your app.js file in order to wrap all the other components. BrowserRouter is a parent component and can have only single child.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*AeJlr8e3EIpxEJIBxOrdZA.png" /><figcaption>app.js</figcaption></figure><p><strong>Link:</strong> Let us now create links to our components. Link component uses the <strong>to</strong> prop to describe the location where the links should navigate to.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*3KSwxwOl79cIKO1MfaVBzw.png" /></figure><p>Now, run your application on the local host and click on the links you created. You will notice the url changing according the value in <strong>to</strong> props of the Link component.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*Z1GKkHMl5dUffw3oMBoTUw.png" /></figure><p><strong>Route:</strong> Route component will now help us to establish the link between component’s UI and the URL. To include routes to the application, add the code give below to your app.js.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/455/1*dArxQg5d-3o9EuLX6XZZOA.png" /></figure><p>Components are linked now and clicking on any link will render the component associated with it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*bXUupJUVVqzXLLgHVSOBUQ.png" /></figure><p>Let us now try to understand the props associated with the Route component.</p><ul><li><strong>1.exact:</strong> It is used to match the exact value with the URL. For Eg., exact path=’/about’ will only render the component if it exactly matches the path but if we remove exact from the syntax, then UI will still be rendered even if the structure is like /about/10.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/573/1*-HVTAAonoIXQalH3BftxbA.png" /></figure><ul><li><strong>2. path:</strong> Path specifies a pathname we assign to our component.</li><li><strong>3. component:</strong> It refers to the component which will render on matching the path.</li></ul><p><strong>Note:</strong> By default, routes are inclusive which means more than one Route component can match the URL path and render at the same time. If we want to render a single component, we need to use <strong>switch</strong>.</p><ul><li><strong>Switch:</strong> To render a single component, wrap all the routes inside the Switch Component.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*7gKBZbhksy90YKfGZF0Txw.png" /></figure><p>Switch groups together several routes, iterates over them and finds the first one that matches the path. Thereby, the corresponding component to the path is rendered.</p><p>After adding all the components here is our complete source code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/749/1*Bp-v1H4_XjwRDO9yoVOBag.png" /><figcaption>app.js</figcaption></figure><p>Now, we you can click on the links and navigate to different components. React Router keeps your application UI in sync with the URL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*nj-lsCLXkyof0D9zPFYrgg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bce782c14351" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Micro Frontend Architecture]]></title>
            <link>https://medium.com/@shilparai/micro-frontend-architecture-9d924f2d714c?source=rss-34282bd3df09------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d924f2d714c</guid>
            <dc:creator><![CDATA[Shilpa Rai]]></dc:creator>
            <pubDate>Mon, 20 Apr 2020 14:32:48 GMT</pubDate>
            <atom:updated>2020-04-20T14:35:49.121Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tVDsu0LQk4rJs-q47O0y7A.png" /></figure><h3>What Are Micro Frontends?</h3><p>A microfrontend architecture’ is an approach to building front-end applications modeled off of <a href="https://martinfowler.com/articles/microservices.html">microservices</a>.</p><p>The idea is to split your front-end into a set of independently deployable, loosely coupled applications. These applications are then assembled together to create a single user-facing application. Which we define as:</p><blockquote><strong><em>“An architectural style where independently deliverable frontend applications are composed into a greater whole.”</em></strong></blockquote><p>Some of the key benefits that we’ve seen from micro frontends are:</p><ul><li>smaller, more cohesive and maintainable codebases</li><li>more scalable organisations with decoupled, autonomous teams</li><li>the ability to upgrade, update, or even rewrite parts of the frontend in a more incremental fashion than was previously possible</li></ul><h3>Why Micro Frontend Matters?</h3><blockquote>In the Modern Era, new web apps, the front end is becoming bigger and bigger, and the back end is getting less important. Most of the code written on the frontend. And the Monolith approach doesn’t work for a larger web application. A monolithic approach to a large front-end application becomes unwieldy. There needs to be a tool of breaking it up into smaller modules that act independently. The solution to the problem is Micro frontend. As Micro Frontend code is written only in pure JavaScript and any of the javascript frameworks used or migrated from one framework to another.</blockquote><h3>When to use micro frontends</h3><ul><li>Huge code base where different teams are contributing to</li><li>Code ownership get messy</li><li>Deployment is delayed because of other part of the application</li></ul><h3>Benefits Of Micro Frontend</h3><p>Every day a new JavaScript technology invented and these are increasing faster than a speeding bullet. That sometimes it can be frustrating as every JavaScript technology has its own pros and cons. And while selecting a particular technology, everyone considers the maximum benefit and minimum risk. Micro frontend helps to use different technology for different services.</p><p>Here are some benefits of Micro Frontend –</p><ul><li>Autonomous teams, an individual development team can choose their own technology. The development and deployment speed is very fast.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*mkiuaAcrITD3AEJ3_CILpQ.png" /><figcaption><em>Each application should be owned by a single team</em></figcaption></figure><ul><li>It helps in Continuous and Independent deployment.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gsPqu9gvhYVSSujaeRBdyw.png" /><figcaption><strong><em>Each micro frontend is deployed to production independently</em></strong></figcaption></figure><ul><li>The testing becomes very simple as well as for every small change, don’t have to go and touch the entire application.</li><li>Front-end renovation — Improving new things becomes easier.</li><li>High Resilience and Better Maintenance.</li><li>Support code and style isolation.</li><li>You like to use different FE frameworks</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d924f2d714c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>