<?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 Kriti Poddar on Medium]]></title>
        <description><![CDATA[Stories by Kriti Poddar on Medium]]></description>
        <link>https://medium.com/@kriti16.kp?source=rss-f80d092c7dc4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*yADLR5kg2TOoKCz6wUHEhA.jpeg</url>
            <title>Stories by Kriti Poddar on Medium</title>
            <link>https://medium.com/@kriti16.kp?source=rss-f80d092c7dc4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 10:10:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kriti16.kp/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[Creating a Benchmark for React-Redux apps]]></title>
            <link>https://medium.com/@kriti16.kp/creating-a-benchmark-for-react-redux-apps-243281b784b3?source=rss-f80d092c7dc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/243281b784b3</guid>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Kriti Poddar]]></dc:creator>
            <pubDate>Sun, 28 Oct 2018 12:00:44 GMT</pubDate>
            <atom:updated>2018-10-28T12:48:27.686Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l-0Ls4wlFi504OHKi8TetA.jpeg" /><figcaption>Image taken from: <a href="https://www.pinterest.com/pin/415105290634531837/">https://www.pinterest.com/pin/415105290634531837/</a></figcaption></figure><p>Developers run into a heap of articles or documentations in order to get their heads around the React-Redux technology. It actually becomes very difficult initially until you sort of get a hold on it. Understanding state-flow, Virtual DOM, renderings, tree reconciliations can be challenging. But if you are somebody who is about to start building one, here are a few tips to keep in mind so that you do not go wrong with it.</p><h4>How to avoid React tree re-renderings?</h4><p>Whenever there is a change in a React component’s state or the props that are mapped to its internal state, React re-renders the Virtual DOM. But is that costly? Yes and No. If your application is small then of course it will not be a major performance bottleneck but if you know that the state flow is becoming complex then you need to optimize the re-renders so that the experience is not laggy. But when does a re-render happen?</p><p>Majorly in two scenarios. One, when you call <em>this.setState()</em> and two, when there are dynamically changing properties mapped to state in <em>mapStateToProps()</em>. Whenever a state change is triggered, React first renders the changes in the Virtual DOM and with the help of diffing algorithm, compares the Virtual and the actual DOM to replace it in the actual DOM. This leads to the fact that only those properties should be maintained in the state which should be subjected to changes. But how?</p><ol><li>Maintain those properties in the component’s state which will change in the life-cycle of the component. Otherwise, declare them as class variables. Use <em>this.setState()</em> when you actually want to cause a re-render.</li><li>Map only the required properties in <em>mapStateToProps()</em> from Redux store. Why? Because your Redux store might be having a number of properties but you only require a few of them in your component. If you map the entire store to your component then due to the presence of unnecessary properties and their changes elsewhere in your app, unnecessary re-renders will be triggered.</li><li>Thirdly, you can also avoid re-renders by using React’s <em>shouldComponentUpdate()</em> lifecycle hook. By performing a comparison between the current and the next state and returning false,a re-render can be blocked.</li></ol><p>This way you can limit the number of re-renders in your application which will actually tune the performance.</p><h4>Avoid binding inside render()</h4><p>The important concept where most developers struggle is where to bind functions. But it is better to avoid binding functions within render() so as to stay away from performance implications. The approach that is usually followed because it is neat and inline is:</p><pre>render() {<br>    return &lt;Button onClick = {() =&gt; this.props.submit()} /&gt; ;<br>}</pre><pre>//OR</pre><pre>render() {<br>    return &lt;Button onClick = {() =&gt; this.props.submit.bind(this)} /&gt; ;<br>}</pre><p>But using the above approach, reallocates the function at every render. This means a new reference is created whenever there is a re-render which is disadvantageous. You rather want the reference to be created only once and being pointed at during every render. The better approach will be:</p><pre>handleClick = () =&gt; {<br>    this.props.submit();<br>}</pre><pre>render() {<br>    return &lt;Button onClick = {this.handleClick} /&gt; ;<br>}</pre><p>The same goes with array or object instantiations. Or even inline css styling can be avoided by declaring them only once in class variables.</p><p>The other tips and hacks would be:</p><ol><li>Create dumb components as PureComponent so that React itself triggers a shallow comparison and minimizes your effort.</li><li>Try and break your components into as many as possible reusable components. This will reduce the complexity of shouldComponentUpdate() by avoiding several checks (for avoiding re-renders) which will be moved inside the component itself.</li><li>Use Chrome DevTools profiler to measure your application’s performance. Head to the Performance tab and record the action you want to measure. Under the User Timing section you will notice clearly the number of times your application rendered or the number reconciliations that took place which will help you in optimizing your application accordingly.</li></ol><p>Keeping all of the above points in mind while developing, you will be able to make a reliable and optimized application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=243281b784b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Living Alone — Yay or Nay?]]></title>
            <link>https://medium.com/@kriti16.kp/living-alone-yay-or-nay-2bcc68443673?source=rss-f80d092c7dc4------2</link>
            <guid isPermaLink="false">https://medium.com/p/2bcc68443673</guid>
            <category><![CDATA[philosophy]]></category>
            <category><![CDATA[startup-life]]></category>
            <category><![CDATA[living]]></category>
            <category><![CDATA[experience]]></category>
            <dc:creator><![CDATA[Kriti Poddar]]></dc:creator>
            <pubDate>Mon, 22 Oct 2018 16:30:15 GMT</pubDate>
            <atom:updated>2018-10-23T04:12:29.136Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zdy1sah7oaY4jIn9Yzvmhg.jpeg" /></figure><p>The very fact of renting/buying a home and living alone can be both daunting and exciting at the same time. If it is the phase when you have to shift for your job and it is your first shot at living alone, let me take you through the times you will be encountering at least once. Personally speaking, it has been some time that I have been staying alone and here are a few things that I would like to share about my experience!</p><h4>The Good Part</h4><ul><li>You will have ample amount of time to explore your capabilities. By investing time in cultivating a hobby, you might actually surprise yourself. Be it listening to music, reading books before going to sleep, dancing your heart out, traveling, exploring new places to eat, coding, learning a new language (either technically or linguistically! :P) or cooking, there are so many activities that can interest you.</li><li>Know the importance of your decision and how it impacts you and your surroundings. This can potentially be a long term achievement if you channel your thoughts and energy in the right direction. From making financial decisions to smaller ones like the decisions about your daily chores — you solely control every aspect of your life.</li><li>No curfew! Moving on to the fact that every solo-dweller looks forward to. You control your time as well, there is no one monitoring the time you leave or the time you enter your house.</li><li>You have your own privacy and space. You need not worry about someone listening to your conversation or disturbing you when you are busy doing an important work. You also need not worry about the chocolate in your refrigerator or your bed space. :P</li><li>Do not compromise on anything. You don’t have to count in someone else’s need over yours. You don’t have to keep your music’s volume down because the other person does not like it. You don’t have to worry about being judged on the weirdest habit you might have.</li></ul><h4>The Bad Part</h4><ul><li>Yes, it can get boring at times. You will have moments when you will have no idea about what to do (the best refuge will be — SLEEP!). Having also experienced a great hostel life, I know the feeling of each and every day being dramatic.</li><li>You might also feel the need of some company. Having someone with whom you can share your thoughts or just spend some quality time does not hurt at all.</li><li>Responsibilities. Tons of them and no helping hand. It might break you at times, you will feel the need of having someone who can get you through that hectic day but as they rightly say, ‘You got to do, what you got to do!’</li></ul><p>Though the bad parts are the ones that actually make you strong. If taken in a positive way, you will truly realize about your capabilities and make your &#39;solo-living&#39; experience a happy one!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2bcc68443673" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>