<?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 Kirti Mahajan on Medium]]></title>
        <description><![CDATA[Stories by Kirti Mahajan on Medium]]></description>
        <link>https://medium.com/@mahajankirti515?source=rss-328b7f9ab29a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7f_xlNuaj8bcobbf</url>
            <title>Stories by Kirti Mahajan on Medium</title>
            <link>https://medium.com/@mahajankirti515?source=rss-328b7f9ab29a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 04:55:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mahajankirti515/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[Map Function in ReactJs]]></title>
            <link>https://medium.com/@mahajankirti515/map-function-in-reactjs-7cca9adc18f2?source=rss-328b7f9ab29a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cca9adc18f2</guid>
            <category><![CDATA[map-function]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Kirti Mahajan]]></dc:creator>
            <pubDate>Fri, 09 May 2025 09:51:24 GMT</pubDate>
            <atom:updated>2025-05-09T09:51:24.649Z</atom:updated>
            <content:encoded><![CDATA[<h3>📝 React Notes — 3 Ways to Use .map() to Render Components</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sxmNsHyn1JdyQucOzR8aVw.png" /></figure><pre>first way=&gt; {users.map((user)=&gt;&lt;User {...user}/&gt;)} <br>second way=&gt;  {{users.map((user)=&gt;{<br>      return &lt;User {...user}/&gt;})}<br><br>third way=&gt;{users.map((user)=&gt;(<br>        &lt;User {...user}/&gt;<br>      ))}</pre><pre>const users = [<br>  { firstName: &quot;Aarav&quot;, lastName: &quot;Sharma&quot;, city: &quot;Delhi&quot; },<br>  { firstName: &quot;Sneha&quot;, lastName: &quot;Patel&quot;, city: &quot;Ahmedabad&quot; },<br>  { firstName: &quot;Rohan&quot;, lastName: &quot;Mehta&quot;, city: &quot;Mumbai&quot; },<br>  { firstName: &quot;Isha&quot;, lastName: &quot;Verma&quot;, city: &quot;Bangalore&quot; },<br>  { firstName: &quot;Kunal&quot;, lastName: &quot;Thakur&quot;, city: &quot;Pune&quot; }<br>];</pre><h4>✅ 1. Short Syntax — Arrow Function with Implicit Return</h4><pre>{users.map((user) =&gt; &lt;User {...user} /&gt;)}</pre><ul><li>Most concise way</li><li>No return keyword needed</li><li>Best for single-line rendering</li></ul><h4>✅ 2. Arrow Function with return</h4><pre>{users.map((user) =&gt; {<br>  return &lt;User {...user} /&gt;;<br>})}</pre><ul><li>Use when you need more logic inside the function</li><li>Allows multiline code</li></ul><h4>✅ 3. Classic Example (Commented) without return</h4><pre>{/* {users.map((user) =&gt; (<br>&lt;User {...user} /&gt;)<br>)} */}</pre><ul><li>Same as example 1, just commented for reference</li></ul><h4>💡 Always add a key prop in real-world usage with ( ) brackests</h4><pre>{users.map((user, index) =&gt; (<br>  &lt;User key={index} {...user} /&gt;<br>))}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cca9adc18f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>