<?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 Saravanan Ramupillai on Medium]]></title>
        <description><![CDATA[Stories by Saravanan Ramupillai on Medium]]></description>
        <link>https://medium.com/@sara-vanan?source=rss-b40e3cd6a8ff------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*LZERqq_UxY3l5aVmiLvfrQ.jpeg</url>
            <title>Stories by Saravanan Ramupillai on Medium</title>
            <link>https://medium.com/@sara-vanan?source=rss-b40e3cd6a8ff------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 21:04:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sara-vanan/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[The quest for an Engineering Manager]]></title>
            <link>https://sara-vanan.medium.com/the-quest-for-an-engineering-manager-609259a67d06?source=rss-b40e3cd6a8ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/609259a67d06</guid>
            <category><![CDATA[engineering]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[team-building]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Saravanan Ramupillai]]></dc:creator>
            <pubDate>Tue, 11 Feb 2025 12:55:34 GMT</pubDate>
            <atom:updated>2025-02-11T23:13:44.261Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YdfaGRVqKGXMFBnybcwhwQ.jpeg" /></figure><p>As an Engineering manager, The responsibility caters to both <em>Technical</em> aspect as well as <em>Managerial aspect. </em>We will be naturally good at technical as we already travelled in that path over certain period of time. Getting good at Managerial responsibilities requires time as well as good understanding of fundamentals.</p><p>When It comes to Managerial, I have often heard following very abstract but deep questions</p><ol><li><em>Why do you say your team is high performing team?</em></li><li><em>How do you handle conflicts?</em></li><li><em>How do you ensure the timely deliverables?</em></li><li><em>What is your experience on delivering with tight schedules?</em></li><li><em>How to do you motivate the team?</em></li></ol><p>Sounds familiar, you are not alone. Understanding the deep meaning / intention of this questions is not easy, because these are all highly ambiguous questions, different person would have different meaning to it based on their understanding level.</p><p>So I have listed down all the questions and read them again and again to understand the true meaning of it. And finally realised that all of these question boils down to the following simple fundamental questions</p><ol><li><em>What is Team?</em></li><li><em>What makes the individual to come together and operates as single team?</em></li><li><em>What drives the team forward?</em></li></ol><blockquote>Basically “Team” means that group of individuals who has the <strong>shared convictions </strong>to do / achieve something. — The One Minute Manager.</blockquote><p>I think this one fundamental deep definition pretty much answers all the questions. If we debrief the meaning of shared conviction it actually answers the following questions</p><ol><li>What needs to be done?</li><li>Why it needs to be done?</li></ol><p>If the Team has the answer to above questions then the question of <em>How it needs to be done?</em> will be easily figured out by the Team itself. No one needs to do extra work for that.</p><p>Then the next question raised to me was If the team can do everything since they know what needs to be achieved, <em>What is the role of an Manager here?</em></p><p>To answer to my question I listed down what I have been really doing in office day to day and list goes as follows</p><ol><li><em>Providing the necessary inputs to help the team to take decisions</em></li><li><em>Providing the necessary resources to operate.</em></li><li><em>Foreseeing the dependencies and assisting the team to tackle it.</em></li><li><em>Encouraging team to have flat and open communication, encourage one another.</em></li><li><em>Help the individuals to push the boundary of what he/she can do.</em></li><li><em>Set the growth direction for the individuals</em></li></ol><p>If I really look at all these activities from birds eye view, all of these relates to meaning of</p><p><strong><em>At what environment / culture the team operates?</em></strong></p><p>From my above activities, I can see that The team operates in an environment where it gets constant</p><ol><li><em>Support.</em></li><li><em>Necessary resources to get the job done.</em></li><li><em>Motivation to move forward / push the boundary.</em></li><li><em>High level of trust where one self doesn’t need to worry about being vulnerable.</em></li><li><em>Autonomous to operate independency and takes the informed decision.</em></li></ol><p>So now what is the job of the manager now?, in a simple line</p><blockquote><strong>Creating an environment / culture where team can thrive to achieve the goal</strong></blockquote><p>Once I understood the fundamentals, I answering to the original questions listed in the first place is becomes so simple.</p><blockquote>Why do you say your team is high performing team?</blockquote><blockquote>Because My team knows what needs to done, why its needs to be done, and how it helps the customer. Also they operate in the environment where they get constant support and motivation to push the boundaries and move forward resulting in delivering more values to the customer — which we call high performing team.</blockquote><p>With this base line understanding of a Team, Answering the rest of the questions become simple. Try it yourself, post your answer in the comment below.</p><p><em>References:<br>I wouldn’t be able to connect these dots with out the help of following books and videos.</em></p><ol><li><a href="https://www.amazon.in/New-One-Minute-Manager/dp/0008128049?crid=13I79WO2ZFGQV&amp;dib=eyJ2IjoiMSJ9.hvRYK1ij7YekHe6o9Y27woKPX3_bW9vJqbm2QpagxIVrZPCGtDAZveXz3OMr7o5wa8Hhk63r02EYI3jn8pvQfoYBKL4F6nruTmawETBclRpB6Pjeup1kA_af6OV-JUoxpB-FYZwNRLIw_MpaZ0-r7TNlnZAHV7zMJRqULLNcJSAdIEfyxJ2ETrYKulQsoHIWc0mKkpUVtESXhRAY62xRfJRXzZIOC9CU-4Iz6dTSHtA.XtF0NjSVWgpGo2HxpGSq-NPaP7DJT4JhTAcWjOgbdR0&amp;dib_tag=se&amp;keywords=one+minute+manager+book&amp;qid=1739251474&amp;sprefix=one+minute+manager,aps,211&amp;sr=8-4">The One Minute Manager</a></li><li><a href="https://www.amazon.in/Leading-Effective-Engineering-Teams-Contributors/dp/B0DCHPLZZ9?crid=3DLVL2D00CHDI&amp;dib=eyJ2IjoiMSJ9.iOKPWFZ4YgPCTfL6tKHvYTx3zQGLi3qeCHSD0k7Do_aJd1qxFKPa1gRO_mTHX_rU2oZYe2r1MPx5RgYtUL2SROw2wVomZlg2zSzhszVusGW5PyFPy-NGEQBTksJVRboqe6jgBbL4F-QmV1gUTF7QUoHGZyunZv8AgwwIXGNYVtg9g_AqN8rWE9JkSx0hmnYSkl_jRDTeXmEwj0iWfUkgA0OxakRL_qNRbALnvPMdWgE.hoyUVbYyBt6UzcFS7vbDpSSqtuVUsMpbkukD4KLP-Rc&amp;dib_tag=se&amp;keywords=leading+effective+engineering+teams&amp;qid=1739251581&amp;sprefix=leading+effec,aps,219&amp;sr=8-1">Leading Effective Engineering Team</a></li><li><a href="https://www.amazon.in/Five-Dysfunctions-Team-Leadership-Paperback/dp/B0C4HBPVJL?crid=2VPC8NYA2RNPI&amp;dib=eyJ2IjoiMSJ9.3j4VXqC1r-YiYBzMPp2MLgokgfP2tVqGW_S5eA086N8X30TAsTNSFa-k-rO1VNtOxH0Pk6dXGeX0369qVUSAzgkBuHiUvNCWmtejtWXNWI3mgTSVB-CzE7443pIlaaeNBoITs99Vx39evb5LVOingd_zkR7zZEiTHdo0SuRghjxDXAE-yzbuaVx0xIF_C_08GwcU-K4eh9_fW8Rx7oHLUUaf7rfQ1bc3xf1ov7FJsbg.B22fT4yRO7m8HRhAEQCdCBodb9BZLUZEFQQINsU4YFQ&amp;dib_tag=se&amp;keywords=five+dysfunctions+of+a+team&amp;qid=1739251622&amp;sprefix=five+d,aps,216&amp;sr=8-1">Five Dysfunctions of team</a></li><li><a href="https://www.youtube.com/watch?v=Q_bJVokYLRI">What Engineering Manager should do</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=609259a67d06" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Zero Config Tailwind 3.x with Rsbuild]]></title>
            <link>https://sara-vanan.medium.com/zero-config-tailwind-3-x-with-rsbuild-550756111945?source=rss-b40e3cd6a8ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/550756111945</guid>
            <category><![CDATA[rsbuild]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[nextui]]></category>
            <category><![CDATA[tailwind-css]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Saravanan Ramupillai]]></dc:creator>
            <pubDate>Sun, 17 Nov 2024 12:05:22 GMT</pubDate>
            <atom:updated>2024-11-17T12:15:39.915Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pHmBQ-2oCFFtUjIk" /></figure><p>Zero config is becoming default standard to increase the developer experience as well as making it easy for early adapter. As you know TailwindCSS 4 is on the way with Zero Config or with Config using CSS file here how can we achieve the same using TailwindCSS 3.x itself with Rsbuild.</p><p>If we are working with TailwindCSS 3.x, we typically need to tell tailwind about what are the files TailwindCSS needs to be parsed and to generate the output css files with only classes consumed in those files. Here is the typical Tailwind config file in the root directory.</p><pre>/** @type {import(&#39;tailwindcss&#39;).Config} */<br>module.exports = {<br>  content: [<br>    &quot;./src/**/*.{js,jsx,ts,tsx,html}&quot;, // Update the paths according to your project structure<br>    &quot;./public/index.html&quot;<br>  ],<br>  theme: {<br>    extend: {<br>      colors: {<br>        // Add your custom colors here<br>        primary: &#39;#3490dc&#39;,<br>        secondary: &#39;#ffed4a&#39;,<br>        accent: &#39;#e3342f&#39;,<br>      },<br>      spacing: {<br>        &#39;128&#39;: &#39;32rem&#39;,<br>        &#39;144&#39;: &#39;36rem&#39;,<br>      },<br>      borderRadius: {<br>        &#39;4xl&#39;: &#39;2rem&#39;,<br>      },<br>    },<br>  },<br>  plugins: [<br>    // Add your plugins here<br>  ],<br>}</pre><p>What is the issue, everything looks cool in here right?. Yes there is nothing wrong here except statically specifying the list of file paths inside content[] key.</p><p>Lets see why it is a problem: Say for example; we want to consume the design system built using TailwindCSS like NextUI. We need only few number of widgets from NextUI, we will never use all the components of the design system. So when consuming only <a href="https://nextui.org/docs/guide/installation#individual-installation">needed widgets as specified here in this doc</a> we need to manually change the Tailwind.config.js to include the installed widgets file paths to tell Tailwind to include those files when parsing and generating output CSS files every time we install widgets. Here is the such config for consuming Button widget from NextUI.</p><pre>// tailwind.config.js<br>const {nextui} = require(&quot;@nextui-org/theme&quot;);<br><br>/** @type {import(&#39;tailwindcss&#39;).Config} */<br>module.exports = {<br>  content: [<br>    // single component styles<br>    &quot;./node_modules/@nextui-org/theme/dist/components/button.js&quot;,<br>    // or you can use a glob pattern (multiple component styles)<br>    &#39;./node_modules/@nextui-org/theme/dist/components/(button|snippet|code|input).js&#39;<br>  ],<br>  theme: {<br>    extend: {},<br>  },<br>  darkMode: &quot;class&quot;,<br>  plugins: [nextui()],<br>};</pre><p>This is a problem when multiple person working on a project. As a platform engineer We cannot encourage everyone on the team to go and change the build config as that is not their job to do, they are busy engineers working hard to delivery their features on time.</p><p>To solve this manual work, we can utilise the brand new <a href="https://rsbuild.dev/">rsbuild</a> plugin <a href="https://github.com/rspack-contrib/rsbuild-plugin-tailwindcss">rsbuild-plugin-tailwindcss</a> which uses its build time module graph to dynamically update the content[] from which Tailwind need parse and generate the css file. It opens the door to simplifying the consumption of TailwindCSS components independently.</p><p>Here is the simple project that show cases the greater impact of this plugin. Here we have only consumed the button widget from NextUI with only needed Tailwind config.</p><p><a href="https://codesandbox.io/p/devbox/gifted-goodall-8w8wxv?embed=1&amp;file=%2Fsrc%2FApp.tsx">https://codesandbox.io/p/devbox/gifted-goodall-8w8wxv?embed=1&amp;file=%2Fsrc%2FApp.tsx</a></p><p><em>Originally published at </em><a href="https://yab.hashnode.dev/zero-config-tailwind-3x-with-rsbuild"><em>https://yab.hashnode.dev</em></a><em> on November 17, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=550756111945" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React 19 Impact on Data Management Libraries]]></title>
            <link>https://sara-vanan.medium.com/react-19-impact-on-data-management-libraries-90a0e01c11aa?source=rss-b40e3cd6a8ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/90a0e01c11aa</guid>
            <category><![CDATA[react-query]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-hook]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Saravanan Ramupillai]]></dc:creator>
            <pubDate>Thu, 09 May 2024 12:16:52 GMT</pubDate>
            <atom:updated>2024-05-09T12:39:55.180Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6q3ixi-RJALwrsNw" /></figure><p>React 19 has come up many new features mainly focused on the way we handle data. Yes, Now React provides many hooks to handle effective data fetching as well as data mutation. Let’s quickly list down all of them here.<br>New Hooks:</p><p>Many enhancements:</p><p><strong>Introduction of Action:</strong></p><p>Action in React is anything we want to perform after the users interacted with UI.<br>Eg: Clicking the button is Action. Submitting the Form is an Action and list goes on.</p><p>Earlier we used to do it in different way by combining multiple hooks to name a few useEffect, useState, useMemo.</p><p>But now React has brought up intuitive API so that we do not need more boiler plate code to solve that problem.</p><p>Let’s take the simple example of saving user details:</p><p>sample of without action:</p><pre>function UpdateUser() {<br>    const [status, setStatus] = useState(&quot;idle&quot;);<br>    const saveUser = (userData) =&gt; {<br>        setStatus(&quot;saving&quot;);<br>        service.saveUser(userData)<br>        .then(() =&gt; {<br>            setStatus(&quot;idle&quot;);<br>            redirect(&quot;/userdetail&quot;);<br>        }).catch(() =&gt; {<br>            setStatus(&quot;error&quot;);<br>        })<br>    }<br><br>   return (<br>        &lt;&gt;<br>            {status == &quot;saving&quot; ? &quot;Saing....&quot; : &quot;&quot;}<br>            &lt;button onClikc={() =&gt; saveUser()}&gt;save user&lt;/button&gt;<br>        &lt;/&gt;<br>   )<br>}</pre><p>sample with action:</p><pre>function UpdateUser() {<br>    const [isPending, startTransition] = useTransition();<br>    const [error, setError] = useState();<br>    const saveUser = (userData) =&gt; {<br>        startTransition(async () =&gt; {<br>            await service.saveUser(userData)<br>                .then(() =&gt; {<br>                   redirect(&quot;/userdetail&quot;);<br>                })<br>                .catch(err =&gt; {<br>                    setError(err);<br>                });<br>        });<br>    }<br><br>   return (<br>        &lt;&gt;<br>            {isPending ? &quot;Saing....&quot; : &quot;&quot;}<br>            &lt;button onClikc={() =&gt; saveUser()}&gt;save user&lt;/button&gt;<br>        &lt;/&gt;<br>   )<br>}</pre><p>By wrapping the action, React has introduced two hooks: useActionState, useOptimistic.</p><p><strong>useActionState Hook:</strong></p><p>This hook used to handle the states of data mutation, eg: sending data to server. For example, here is a simple case of updating profile info.</p><pre>import { useActionState } from &#39;react&#39;;<br><br>export function MemberForm() {<br>  const [error, submitAction, isPending] = useActionState(<br>    async (previewState, formData) =&gt; {<br>      const error = await updateUser(formData).catch(<br>          (err) =&gt; &#39;Error &#39; + previewState<br>      );<br>      if(!error) {<br>        redirect(&quot;/memberdetail&quot;);<br>        return null;<br>      }<br>      return error;<br>    }<br>  );<br><br>  return (<br>    &lt;form id=&quot;memberForm&quot; name=&quot;memberForm&quot; action={submitAction}&gt;<br>      {isPending &amp;&amp; &lt;p&gt;Updating ...&lt;/p&gt;}<br>      &lt;fieldset&gt;<br>        &lt;label htmlFor=&quot;firstName&quot;&gt;First Name&lt;/label&gt;<br>        &lt;input id=&quot;firstName&quot; name=&quot;FirstName&quot; type=&quot;text&quot; /&gt;<br>      &lt;/fieldset&gt;<br>      &lt;fieldset&gt;<br>        &lt;label htmlFor=&quot;lastName&quot;&gt;Last Name&lt;/label&gt;<br>        &lt;input id=&quot;lastName&quot; name=&quot;LastName&quot; type=&quot;text&quot; /&gt;<br>      &lt;/fieldset&gt;<br>      &lt;!-- implementation below --&gt;<br>      &lt;PhoneNumber /&gt;<br>      &lt;button type=&quot;submit&quot;&gt;Save&lt;/button&gt;<br>      {error &amp;&amp; &lt;p&gt;{error} &lt;/p&gt;}<br>    &lt;/form&gt;<br>  );<br>}</pre><p>The action function provided to useActionState() should return null or error upon performed action and form will get reset automatically. The previewState will be whatever we returned from action.</p><p><strong>useFormStatus Hook:</strong></p><p>With this hook we can know the form submission status within form components.</p><pre>function PhoneNumber() {<br>  const { pending } = useFormStatus();<br>  return (<br>     &lt;fieldset disabled={pending}&gt;<br>       &lt;label htmlFor=&quot;Phone&quot;&gt;Phone&lt;/label&gt;<br>       &lt;input id=&quot;Phone&quot; name=&quot;Phone&quot; type=&quot;number&quot; /&gt;<br>     &lt;/fieldset&gt;<br>  )<br>}</pre><p><strong>useOptimistic() Hook:</strong></p><p>This hook used to perform the optimistic update to the UI while we are waiting for the response from the server. Eg: when hitting Like button, we don&#39;t want to wait until the server respond with success status to show the Like reaction. We can show the reaction immediately and once the response came from the server; we will synchronise it to our local state. This is what is called optimistic update.</p><p>To acheive this, earlier we have to keep track of states of API and manually switch back to old value just in case API got failed. With this hook, our code will be less boiler plate. Here is the simple example of Like button.</p><pre>import React from &#39;react&#39;;<br><br>function LikeButton({ count, onClick }) {<br>  // creating optimistic state for Like count.<br>  const [optimisticCount, setOptimisticCount] = React.useOptimistic(<br>    count,<br>    (state, newValue) =&gt; {<br>      // Here is where we calculate the immdiateState.<br>      // return value of this state function will be immediately<br>      // set to optimisticCount<br>      console.log(&#39;optimistic callback calling &#39;, state, newValue);<br>      return newValue;<br>    }<br>  );<br><br>  // creating the transition for Like state update because <br>  // setOptimisticCount method can only be called inside Action.<br>  // Actions are simple async function inside startTransition() method.<br>  const [isPending, startTransition] = React.useTransition();<br><br>  const updateCount = () =&gt; {<br>    startTransition(async () =&gt; {<br>      // immediate incrementing the count <br>      setOptimisticCount(optimisticCount+1);<br>      // wait until the values get saved in parent component<br>      await onClick(optimisticCount).catch((err) =&gt; console.log(err));<br>      // This transition will be in pending states untill it returns<br>      return null;<br>    });<br>  };<br><br>  return (<br>    &lt;p&gt;<br>      &lt;span&gt;<br>        {optimisticCount} {count !== optimisticCount ? &#39;updating...&#39; : &#39;&#39;}<br>      &lt;/span&gt;<br>      &lt;button onClick={updateCount}&gt;Like&lt;/button&gt;<br>    &lt;/p&gt;<br>  );<br>}<br><br>export function ReactionComponent() {<br>  const [count, setCount] = React.useState(0);<br>  const onClick = () =&gt; {<br>    return new Promise((resolve, reject) =&gt; {<br>     // mimiking the delay<br>      setTimeout(() =&gt; {<br>        setCount(count + 1);<br>        reject();<br>      }, 2000);<br>    });<br>  };<br>  return &lt;LikeButton count={count} onClick={onClick} /&gt;;<br>}</pre><p><strong>use API:</strong></p><p>use used to consume resources inside components. The resources can be</p><ol><li><strong>React Context: </strong>Here is the simple utility component and hook to maintain user session.</li></ol><pre> import React from &#39;react&#39;;<br><br> const UserContext = React.createContext();<br><br> export function UserSession({ children }) {<br>   const user = React.useMemo(() =&gt; ({ id: &#39;001&#39;, name: &#39;user&#39; }), []);<br>   return &lt;UserContext value={user}&gt;{children}&lt;/UserContext&gt;;<br> }<br><br> export function useUser() {<br>   return React.use(UserContext);<br> }</pre><p>2. <strong>Promises: </strong>By using this feature, we can directly load data inside component, no need to for extra boilerplate code. Here is the simple example how we used to do before this feature.</p><p>Before:</p><pre> //Before<br> function UserDetailComponent({ userId }) {<br>     const [user, setUser] = useState(null);<br>     useEffect(() =&gt; {<br>         fetchUser(userId)<br>             .then(setUser);<br>     }, [userId]);<br> }</pre><p>After: we can directly pass the promise to the component and consume it using use</p><pre> //After<br> function UserDetailComponent({ userPromise }) {<br>     const user = use(userPromise);<br> }<br><br> function UserProfileComponent({ userId }) {<br>     // this is just to ensure we did not create promise on every render.<br>     // usually we use some data fetching library which will return a same promise<br>     // accross re-renders.<br>     const userPromise = useMemo(() =&gt; {<br>         return fetchUser(userId);<br>     }, [userId]);<br><br>     return (<br>         &lt;React.Suspense fallback={&quot;Loading...&quot;}&gt;<br>             &lt;UserDetailComponent userPromise={userPromise} /&gt;<br>         &lt;/React.Suspense&gt;<br>     );<br> }</pre><p><strong>Enhancements:</strong></p><ol><li><strong>ref as component props:</strong></li></ol><p>Hereafter we can take ref from component props, instead of declaring it as new argument to component function.</p><pre>// before<br>export React.forwardRef(function UserDetails(props, ref) =&gt; {<br>});<br><br>//after<br>export function UserDetails({ user, ref }) {<br>   useImperativeHandle(ref, function () {<br>    return {};<br>   });<br>}<br><br>//...<br>&lt;UserDetails ref={ref}/&gt;</pre><p>2. ref <strong>callback returns the cleanup function:</strong></p><p>With this enhancement we can remove unwanted boiler plate code</p><pre>// before<br>function ProfileDetail() {<br>    const ref = React.createRef();<br><br>    useEffect(() =&gt; {<br>     const listener = () =&gt; {};<br>     ref.current.addEventListener(&quot;keydown&quot;, listener);<br>     return () =&gt; ref.current.removeEventListener(&quot;keydown&quot;);<br>    }, []);<br><br>    return (<br>        &lt;input ref={ref}/&gt;<br>    )<br>}<br><br>//after<br>function ProfileDetail() {<br>    function inputRef(ref) {<br>       const listener = () =&gt; {};<br>       ref.current.addEventListener(&quot;keydown&quot;, listener);<br>       return () =&gt; ref.current.removeEventListener(&quot;keydown&quot;);<br>    }<br><br>    return (<br>        &lt;input ref={inputRef}/&gt;<br>    )<br>}</pre><p><strong>3. Meta tags support in Components:</strong></p><p>We can now change the document Title, based on where the user is in client components.</p><pre>&lt;Router&gt;<br>    &lt;Route path=&quot;/dashboard&quot; element={Dashbaord} /&gt;<br>    &lt;Route path=&quot;/profile&quot; element={Profile} /&gt;<br>&lt;/Router&gt;<br><br>function Dashboard() {<br>    return (<br>        &lt;title&gt;Sales Dashboard&lt;/title&gt;<br>    )<br>}<br><br>function Profile() {<br>    return (<br>        &lt;title&gt;Johon Profile&lt;/title&gt;<br>    )<br>}</pre><h3>Should you really care:</h3><p>Provided all these new features and enhancements, what does it means if you user using data management library like <a href="https://tanstack.com/query/latest">React Query</a>, <a href="https://swr.vercel.app/">SWR</a> should you really care about all these new data management option react has brought built in.</p><p>IMO, these are all low-level hooks that library author can use to remove boiler plate code inside the codebase. Because we are already fetching the data at the component level using the above data management libraries along with features like local caching and effective invalidations.</p><p>We can utilise the enhancements like ref, use(Context), meta tags to remove boiler plate code make our code base cleaner.</p><p>The main motive of moving towards native form elements for data management is to opt for progressive enhancement. In that perspective, we can incrementally change the code base, so that app will work with minimal JavaScript.</p><p><a href="https://stackblitz.com/edit/vitejs-vite-sqwmwo?file=src%2Fmain.jsx">Here is the sample playground</a>.</p><p><em>Originally published at </em><a href="https://yab.hashnode.dev/exploring-react-19-impact-on-users-already-utilizing-data-management-libraries-like-react-query-and-swr"><em>https://yab.hashnode.dev</em></a><em> on May 9, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=90a0e01c11aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Here is my learning when publishing a npm package]]></title>
            <link>https://sara-vanan.medium.com/here-is-my-learning-when-publishing-a-npm-package-f62502095a5d?source=rss-b40e3cd6a8ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/f62502095a5d</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[react-hook]]></category>
            <dc:creator><![CDATA[Saravanan Ramupillai]]></dc:creator>
            <pubDate>Fri, 01 Oct 2021 03:29:32 GMT</pubDate>
            <atom:updated>2021-10-01T03:29:32.484Z</atom:updated>
            <content:encoded><![CDATA[<h3>Here is my learning when publishing a npm package.</h3><p><a href="https://groupstudy.dev/how-to-publish-npm-package">Here are my learnings when writing a npm package</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f62502095a5d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Best way to reduce bundle size is to not have third party dependencies inside source code.]]></title>
            <link>https://sara-vanan.medium.com/best-way-to-reduce-bundle-size-is-to-not-have-third-party-dependencies-inside-source-code-9f6670da221e?source=rss-b40e3cd6a8ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f6670da221e</guid>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[skypack]]></category>
            <dc:creator><![CDATA[Saravanan Ramupillai]]></dc:creator>
            <pubDate>Tue, 21 Sep 2021 04:59:33 GMT</pubDate>
            <atom:updated>2021-09-21T05:00:31.642Z</atom:updated>
            <content:encoded><![CDATA[<p>Here is explanation of the approach i took,</p><p><a href="https://groupstudy.dev/snowpack-webpack">Snowpack + Webpack = 🎉</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*A3fwYwzeClljwiAaMGruQg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f6670da221e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Whats new in React Router v6]]></title>
            <link>https://sara-vanan.medium.com/whats-new-in-react-router-v6-d5fb9bfd0bed?source=rss-b40e3cd6a8ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5fb9bfd0bed</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react-router]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Saravanan Ramupillai]]></dc:creator>
            <pubDate>Mon, 13 Sep 2021 16:27:21 GMT</pubDate>
            <atom:updated>2021-09-13T16:27:21.524Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://groupstudy.dev/6-cool-new-features-in-react-router-6">Cool feature of React router v6</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5fb9bfd0bed" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How we reduced our webpack build time by 50%?]]></title>
            <link>https://sara-vanan.medium.com/how-we-reduced-our-webpack-build-time-by-50-f6689b25948?source=rss-b40e3cd6a8ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6689b25948</guid>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Saravanan Ramupillai]]></dc:creator>
            <pubDate>Sat, 11 Sep 2021 12:22:19 GMT</pubDate>
            <atom:updated>2021-09-11T12:22:19.527Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://groupstudy.dev/how-we-reduced-our-webpack-build-time-by-50">How we reduced our webpack build time by 50%?</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6689b25948" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Race B/W Different ways to remove elements from array in Javascript]]></title>
            <link>https://sara-vanan.medium.com/race-b-w-different-ways-to-remove-elements-from-array-in-javascript-d1a3980d8473?source=rss-b40e3cd6a8ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/d1a3980d8473</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Saravanan Ramupillai]]></dc:creator>
            <pubDate>Sat, 03 Apr 2021 06:27:18 GMT</pubDate>
            <atom:updated>2021-04-03T06:27:18.287Z</atom:updated>
            <content:encoded><![CDATA[<h4>Using Array.splice() helper method:</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528248%252C231%252C28%252C1%2529%26t%3Dblackboard%26wt%3Dnone%26l%3Dauto%26ds%3Dfalse%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%25252F%25252Flet%252520assume%252520we%252520already%252520know%252520the%252520index%252520of%252520element%252520to%252520remove%25250Avar%252520arr%252520%25253D%252520new%252520Array%25281000%2529.fill%25281%2529%25253B%25250A%25250Alet%252520index%252520%25253D%252520500%25253B%25250A%25250Aarr.splice%2528index%25252C%2525201%2529%25253B%25250A&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528248%25252C231%25252C28%25252C1%252529%26t%3Dblackboard%26wt%3Dnone%26l%3Dauto%26ds%3Dfalse%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%2525252F%2525252Flet%25252520assume%25252520we%25252520already%25252520know%25252520the%25252520index%25252520of%25252520element%25252520to%25252520remove%2525250Avar%25252520arr%25252520%2525253D%25252520new%25252520Array%2525281000%252529.fill%2525281%252529%2525253B%2525250A%2525250Alet%25252520index%25252520%2525253D%25252520500%2525253B%2525250A%2525250Aarr.splice%252528index%2525252C%252525201%252529%2525253B%2525250A&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/6b885c37427f2714ad50908c1a3288d0/href">https://medium.com/media/6b885c37427f2714ad50908c1a3288d0/href</a></iframe><h4>Using Array.slice() helper method:</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528248%252C231%252C28%252C1%2529%26t%3Dblackboard%26wt%3Dnone%26l%3Dauto%26ds%3Dfalse%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%25252F%25252Flet%252520assume%252520we%252520already%252520know%252520the%252520index%252520of%252520element%252520to%252520remove%25250Avar%252520arr%252520%25253D%252520new%252520Array%25281000%2529.fill%25281%2529%25253B%25250A%25250Alet%252520index%252520%25253D%252520500%25253B%25250Alet%252520newArrWithRemovedElement%252520%25253D%252520arr.slice%25280%25252C%252520index%252520-%2525201%2529%25250A%252509.concat%2528%25250A%252520%252520%252520%252520arr.slice%2528index%252520%25252B%2525201%25252C%252520arr.lenght-1%2529%25250A%252520%252520%2529%25253B&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528248%25252C231%25252C28%25252C1%252529%26t%3Dblackboard%26wt%3Dnone%26l%3Dauto%26ds%3Dfalse%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%2525252F%2525252Flet%25252520assume%25252520we%25252520already%25252520know%25252520the%25252520index%25252520of%25252520element%25252520to%25252520remove%2525250Avar%25252520arr%25252520%2525253D%25252520new%25252520Array%2525281000%252529.fill%2525281%252529%2525253B%2525250A%2525250Alet%25252520index%25252520%2525253D%25252520500%2525253B%2525250Alet%25252520newArrWithRemovedElement%25252520%2525253D%25252520arr.slice%2525280%2525252C%25252520index%25252520-%252525201%252529%2525250A%25252509.concat%252528%2525250A%25252520%25252520%25252520%25252520arr.slice%252528index%25252520%2525252B%252525201%2525252C%25252520arr.lenght-1%252529%2525250A%25252520%25252520%252529%2525253B&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb9ba91055c30f204936ff7e6a295620/href">https://medium.com/media/cb9ba91055c30f204936ff7e6a295620/href</a></iframe><h4>Using Array’s length property:</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528248%252C231%252C28%252C1%2529%26t%3Dblackboard%26wt%3Dnone%26l%3Dauto%26ds%3Dfalse%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%25252F%25252Flet%252520assume%252520we%252520already%252520know%252520the%252520index%252520of%252520element%252520to%252520remove%25250Avar%252520arr%252520%25253D%252520new%252520Array%25281000%2529.fill%25281%2529%25253B%25250A%25250Alet%252520index%252520%25253D%252520500%25253B%25250A%25250Aarr%25255Bindex%25255D%252520%25253D%252520arr%25255Barr.length%252520-%2525201%25255D%25253B%25250Aarr.length--%25253B&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528248%25252C231%25252C28%25252C1%252529%26t%3Dblackboard%26wt%3Dnone%26l%3Dauto%26ds%3Dfalse%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%2525252F%2525252Flet%25252520assume%25252520we%25252520already%25252520know%25252520the%25252520index%25252520of%25252520element%25252520to%25252520remove%2525250Avar%25252520arr%25252520%2525253D%25252520new%25252520Array%2525281000%252529.fill%2525281%252529%2525253B%2525250A%2525250Alet%25252520index%25252520%2525253D%25252520500%2525253B%2525250A%2525250Aarr%2525255Bindex%2525255D%25252520%2525253D%25252520arr%2525255Barr.length%25252520-%252525201%2525255D%2525253B%2525250Aarr.length--%2525253B&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9e5c7f78d4aa02f98312159b05f63484/href">https://medium.com/media/9e5c7f78d4aa02f98312159b05f63484/href</a></iframe><h4>Using Array.filter helper method: (when we don’t know the index of item)</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%3Fbg%3Drgba%2528248%252C231%252C28%252C1%2529%26t%3Dblackboard%26wt%3Dnone%26l%3Dauto%26ds%3Dfalse%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%2525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%25252F%25252Flet%252520assume%252520we%252520don%2527t%252520know%252520the%252520index%252520to%252520remove%252520the%252520item%25250Avar%252520arr%252520%25253D%252520new%252520Array%25281000%2529.fill%25281%2529.map%2528%2528%2529%252520%25253D%25253E%252520Math.random%2528%2529%252520%252A%252520100000%2529%25253B%25250A%25250Alet%252520elementToRemove%252520%25253D%2525205%25253B%25250A%25250AnewArrWithRemovedElement%252520%25253D%252520arr.filter%2528element%252520%25253D%25253E%252520element%252520%2521%25253D%25253D%252520elementToRemove%252520%2529%25253B&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2F%3Fbg%3Drgba%252528248%25252C231%25252C28%25252C1%252529%26t%3Dblackboard%26wt%3Dnone%26l%3Dauto%26ds%3Dfalse%26dsyoff%3D20px%26dsblur%3D68px%26wc%3Dtrue%26wa%3Dtrue%26pv%3D56px%26ph%3D56px%26ln%3Dfalse%26fl%3D1%26fm%3DFira%2BCode%26fs%3D14px%26lh%3D152%252525%26si%3Dfalse%26es%3D2x%26wm%3Dfalse%26code%3D%2525252F%2525252Flet%25252520assume%25252520we%25252520don%252527t%25252520know%25252520the%25252520index%25252520to%25252520remove%25252520the%25252520item%2525250Avar%25252520arr%25252520%2525253D%25252520new%25252520Array%2525281000%252529.fill%2525281%252529.map%252528%252528%252529%25252520%2525253D%2525253E%25252520Math.random%252528%252529%25252520%25252A%25252520100000%252529%2525253B%2525250A%2525250Alet%25252520elementToRemove%25252520%2525253D%252525205%2525253B%2525250A%2525250AnewArrWithRemovedElement%25252520%2525253D%25252520arr.filter%252528element%25252520%2525253D%2525253E%25252520element%25252520%252521%2525253D%2525253D%25252520elementToRemove%25252520%252529%2525253B&amp;image=https%3A%2F%2Fcarbon.now.sh%2Fstatic%2Fbrand%2Fbanner.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d33e82a49bab482a2173ffbba8f692f/href">https://medium.com/media/9d33e82a49bab482a2173ffbba8f692f/href</a></iframe><blockquote>And finally here is the performance of each approach. out of which Array.splice method win the race and it more performant.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9oHO0-zfLN0Gsom2n4tKzg.png" /></figure><p><a href="https://jsben.ch/Thih4">JSBEN.CH Performance Benchmarking Playground for JavaScript</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1a3980d8473" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Insights on various ways to Iterate an Array in Javascript]]></title>
            <link>https://sara-vanan.medium.com/insights-on-various-ways-to-iterate-an-array-in-javascript-c7a64dcda867?source=rss-b40e3cd6a8ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7a64dcda867</guid>
            <category><![CDATA[performance]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Saravanan Ramupillai]]></dc:creator>
            <pubDate>Sat, 13 Mar 2021 07:25:26 GMT</pubDate>
            <atom:updated>2021-03-13T07:25:26.358Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*wbHI08KJrwL0boF9ld2NOw.jpeg" /></figure><p>An Array is essential data structure we extensively use in our day to day programming. In JS specifically we have lot of options when we need to work on array of data. Based on what we want as a result of iteration, we need to choose the right iteration option for better readability and efficiency.</p><h4>Loopings:</h4><ol><li><strong>for operator :-<br></strong>with for-operator we can iterate over array with index. we need to calculate the index ourself to get element of an array.</li><li><strong>for…of operator :-<br></strong>This operator lets us to directly get an element so we do not need to calculate the index.</li><li><strong>for…in operator :-<br></strong>This operator lets us to directly get an index of an array, so we do not need to calculate the index.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_rgl4NwwRNwHutRtFsynQ.png" /></figure><h4><strong>Map:</strong></h4><p>Choose map when you want to do operation on each element of an array and to get result as an array of same size.</p><h4>Filter:</h4><p>Choose filter when to what to filter out element inside array based on condition.</p><h4>Reduce:</h4><p>Choose this when we want to convert all element inside into single value</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gQUFKuxbiE9zvqCET63Ogw.png" /></figure><p>So based on the need choose the right iterating option of array.</p><h4>Here is the tip: Looping is much faster than array methods (map, reduce, filter, etc), so choose wisely</h4><p><a href="https://jsben.ch/oEDoh">JSBEN.CH Performance Benchmarking Playground for JavaScript</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7a64dcda867" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automation for Publishing React App to Firebase]]></title>
            <link>https://sara-vanan.medium.com/automation-for-publishing-react-app-to-firebase-fa12cb4987cf?source=rss-b40e3cd6a8ff------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa12cb4987cf</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[Saravanan Ramupillai]]></dc:creator>
            <pubDate>Wed, 06 May 2020 03:34:03 GMT</pubDate>
            <atom:updated>2020-05-06T03:34:03.042Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><strong>Publishing React app to Firebase using Github Action</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3LiSz51SU5EdBfBr" /></figure><p>It is been while github action has publically available to everyone to try it out. I started learning it to apply it in my <a href="https://github.com/saravanan10393/readme-later">side project</a> and here are my observations.</p><p>Action (with respective to github) is a independent unit of work, that we wish to perform it on our code-base. (<em>eg: Performing lint analysis, Generating code coverage report, triggering external notification</em>) when some event (<em>code merged, review comments added, review request, issue opened etc</em>) is happening on the codebase.</p><blockquote><strong>Action constructs :-</strong></blockquote><p>Action is simple unit of work (eg: perform lint check), In many cases we generally have bunch of tasks to be performed on our codebase, not just one. So github has defined the following constructs to help us to run the multiple actions together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/0*uqjV58lrvpvNOwWR" /></figure><p>In github, it’s all starting with a single or set of actions that form a <strong>Job</strong>.</p><p>When we wish to run set of actions for during build time (linting, code coverage report) and set of actions for deployment(creating tar file, publishing to npm), we create multiple Jobs that forms a <strong>workflow.</strong></p><p>Now we need someone to execute each action in workflow and update the status of to us, there comes the role of <strong>Runner. </strong>Runner is the VM(virtual machine) necessary software packages to run actions.</p><blockquote><strong>Writing First Workflow :-</strong></blockquote><p>With the overall understanding of how Githup action is structured, let’s write our first workflow, that will build and publish a react app in firebase hosting. We can write the workflow in .yml file using a <a href="https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions">syntax specified by Github</a>. Below workflow .yml is self explanatory. Nothing complex here.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c0817755a0b8aa61544c654e5b85a0ca/href">https://medium.com/media/c0817755a0b8aa61544c654e5b85a0ca/href</a></iframe><p>Once done with writing workflow, we need to save it in specified folder specified by github. .github &gt; workflows &gt; workflow.yml</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/239/1*qvQEJCyyI2DXhIdO_zrmzw.png" /></figure><p>Once checked in the workflow, we can see the Action working when ever we push <em>(the trigger we specified in our yml file)</em> changes to master branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*4wVAhpHiIdRGiZTD0dgopQ.png" /></figure><p><a href="https://github.com/saravanan10393/readme-later">Here is the full working example.</a></p><p>You can get more information in the <a href="https://help.github.com/en/actions">official documentation</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa12cb4987cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>