<?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: Dev Master</title>
    <description>The latest articles on DEV Community by Dev Master (@dev_for).</description>
    <link>https://dev.to/dev_for</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%2F270821%2F2b0ff30b-b97d-4a89-9ac0-5a186714cdf3.jpg</url>
      <title>DEV Community: Dev Master</title>
      <link>https://dev.to/dev_for</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dev_for"/>
    <language>en</language>
    <item>
      <title>Best ways to update state array object using React Hooks?
</title>
      <dc:creator>Dev Master</dc:creator>
      <pubDate>Fri, 21 Aug 2020 06:51:43 +0000</pubDate>
      <link>https://dev.to/dev_for/best-ways-to-update-state-array-object-using-react-hooks-3m8i</link>
      <guid>https://dev.to/dev_for/best-ways-to-update-state-array-object-using-react-hooks-3m8i</guid>
      <description>&lt;p&gt;I have&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [data, setData] = useState([{"name": "joy", "age": 25}, {"name": "tom", "age": 41}]);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Somehow I need to update only a particular object, May be name or age.&lt;/p&gt;

&lt;p&gt;I am doing in such way. But It seems not good.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setData(prevState =&amp;gt; {
      let obj = prevState.find(o =&amp;gt; anycondition);
      if(obj !== undefined) {
        obj.name = "Demo";
      }
      return [...prevState];
    })
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;is there any other method to update only object from state array using React Hooks?&lt;/p&gt;

</description>
      <category>reacthooks</category>
      <category>react</category>
    </item>
    <item>
      <title>Starting a new React JS Project, Any suggestions?</title>
      <dc:creator>Dev Master</dc:creator>
      <pubDate>Thu, 25 Jun 2020 05:43:26 +0000</pubDate>
      <link>https://dev.to/dev_for/starting-a-new-react-js-project-any-suggestions-48b3</link>
      <guid>https://dev.to/dev_for/starting-a-new-react-js-project-any-suggestions-48b3</guid>
      <description>&lt;p&gt;I am going to start a web based fantasy app in react js.&lt;br&gt;&lt;br&gt;
As we are in 2020 ( :'( ), Any suggestion for any modules, tool, coding style etc.&lt;br&gt;&lt;br&gt;
I have worked from 2 years, working with hooks as well. but I am getting bore to use same coding style, copy function from previous project.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>failed: Error during WebSocket handshake: Unexpected response code: 400</title>
      <dc:creator>Dev Master</dc:creator>
      <pubDate>Wed, 05 Feb 2020 07:17:40 +0000</pubDate>
      <link>https://dev.to/dev_for/failed-error-during-websocket-handshake-unexpected-response-code-400-1l20</link>
      <guid>https://dev.to/dev_for/failed-error-during-websocket-handshake-unexpected-response-code-400-1l20</guid>
      <description>&lt;p&gt;WebSocket connection to 'wss://dev.xxxx.com/socket.io/?EIO=3&amp;amp;transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 400&lt;/p&gt;

&lt;p&gt;using socket.io.&lt;br&gt;
for http it is working fine. but on &lt;a href="https://dev.xxxx.com"&gt;https://dev.xxxx.com&lt;/a&gt; it is not working and showing above error. &lt;/p&gt;

&lt;p&gt;any help?&lt;br&gt;
Using CentOS.&lt;/p&gt;

</description>
      <category>help</category>
    </item>
  </channel>
</rss>
