<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sattwik Sahu</title>
    <description>The latest articles on DEV Community by Sattwik Sahu (@swagwik).</description>
    <link>https://dev.to/swagwik</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F424830%2F7661e7c2-dd94-40f9-b773-5b19aad27d3e.png</url>
      <title>DEV Community: Sattwik Sahu</title>
      <link>https://dev.to/swagwik</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/swagwik"/>
    <language>en</language>
    <item>
      <title>Why does React not delete the required component but deletes the last sibling?</title>
      <dc:creator>Sattwik Sahu</dc:creator>
      <pubDate>Tue, 06 Jul 2021 08:52:41 +0000</pubDate>
      <link>https://dev.to/swagwik/why-does-react-not-delete-the-required-component-but-deletes-the-last-sibling-2ob9</link>
      <guid>https://dev.to/swagwik/why-does-react-not-delete-the-required-component-but-deletes-the-last-sibling-2ob9</guid>
      <description>&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/p6g72"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Here is a similar sandbox. To reproduce the problem:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create child objects by clicking "+" button&lt;/li&gt;
&lt;li&gt;Name the children differently by typing in the textfield&lt;/li&gt;
&lt;li&gt;Try to delete a child that is &lt;strong&gt;not the last child&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Instead of the child which you want to delete, the &lt;strong&gt;last child&lt;/strong&gt; will be deleted&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;p&gt;When I try to debug in React DevTools, the element of &lt;code&gt;state.children&lt;/code&gt; that I want to delete is deleted, but it still shows up in the front end.&lt;br&gt;
e.g. When there are child nodes with indices 0..4, I press &lt;strong&gt;delete&lt;/strong&gt; on the component with index &lt;code&gt;2&lt;/code&gt;; In React DevTools, the component with index &lt;code&gt;2&lt;/code&gt; gets deleted, but it deletes component with index &lt;code&gt;4&lt;/code&gt; in the front-end&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>state</category>
    </item>
    <item>
      <title>JS / TS?</title>
      <dc:creator>Sattwik Sahu</dc:creator>
      <pubDate>Mon, 10 Aug 2020 04:22:02 +0000</pubDate>
      <link>https://dev.to/swagwik/js-ts-p39</link>
      <guid>https://dev.to/swagwik/js-ts-p39</guid>
      <description>&lt;p&gt;JavaScript and TypeScript are both popular languages for web Devs. TypeScript allows you to include types in your script, something like Java I guess. So is it worth learning TypeScript or is JavaScript enough? Does one have perks over the other and how?&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
