<?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: Mike Botsko</title>
    <description>The latest articles on DEV Community by Mike Botsko (@viveleroi).</description>
    <link>https://dev.to/viveleroi</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%2F957429%2Ffbf1ecdb-ee56-4126-9bfe-690d5d64c09f.jpeg</url>
      <title>DEV Community: Mike Botsko</title>
      <link>https://dev.to/viveleroi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/viveleroi"/>
    <language>en</language>
    <item>
      <title>Great resources for learning React and Typescript</title>
      <dc:creator>Mike Botsko</dc:creator>
      <pubDate>Sat, 29 Oct 2022 19:43:20 +0000</pubDate>
      <link>https://dev.to/viveleroi/great-resources-for-learning-react-and-typescript-3ec4</link>
      <guid>https://dev.to/viveleroi/great-resources-for-learning-react-and-typescript-3ec4</guid>
      <description>&lt;p&gt;We're about to start a major rewrite of an enterprise-scale web application and it didn't us long to decide on &lt;strong&gt;React + Typescript&lt;/strong&gt;. We're replacing a decade-old AngularJS application so it's a no-brainer to move away from AngularJS. &lt;/p&gt;

&lt;p&gt;While my fellow senior developers and I have some decent experience with React and TS already, these will be relatively new to most of our team - not to mention a major paradigm shift in tooling, libraries, etc.&lt;/p&gt;

&lt;p&gt;To help, I've been gathering a list of my favorite resources for learning React and Typescript - not just syntax and APIs but the approach.&lt;/p&gt;

&lt;p&gt;Please reply with your favorite resources! I'd love to know what helped you or your teams!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://reactjs.org/docs/getting-started.html"&gt;Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://reactjs.org/tutorial/tutorial.html"&gt;Tutorial&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://overreacted.io/a-complete-guide-to-useeffect/"&gt;Complete Guide to useEffect&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://felixgerschau.com/react-component-composition/"&gt;Component Composition&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lukeshiru.dev/articles/the-paired-hook-pattern"&gt;Paired Hook Pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://programmingwithmosh.com/javascript/stateful-stateless-components-react/"&gt;Stateless Components&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/technofunnel/working-with-react-pure-components-166ded26ae48"&gt;Pure Components&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Typescript&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.typescripttutorial.net/"&gt;Tutorials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://2ality.com/2018/04/type-notation-typescript.html"&gt;Type Notation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://react-typescript-cheatsheet.netlify.app/"&gt;React TS Cheatsheet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Other&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/kettanaito/naming-cheatsheet"&gt;Naming Convention Cheatsheet&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>react</category>
      <category>typescript</category>
    </item>
    <item>
      <title>Reducing rerenders in nested/recursive components?</title>
      <dc:creator>Mike Botsko</dc:creator>
      <pubDate>Thu, 27 Oct 2022 18:55:02 +0000</pubDate>
      <link>https://dev.to/viveleroi/reducing-rerenders-in-nestedrecursive-components-3ij3</link>
      <guid>https://dev.to/viveleroi/reducing-rerenders-in-nestedrecursive-components-3ij3</guid>
      <description>&lt;p&gt;&lt;a href="https://codesandbox.io/s/elated-spence-70xdsy?file=/src/tree.js"&gt;Codesandbox&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I'm trying to decide how to port an old pure-js Tree library to React. Because tree components are recursive, no matter my approach I'm seeing rerenders (react devtools profiler w/"record why each component rendered" enabled) because state has changed and needs to be passed to children. &lt;/p&gt;

&lt;p&gt;I've been able to avoid rerendering childless nodes by only passing state setters, but since state has to be passed to children, any node with children renders. So if I click a node to select it, all nodes with children rerender.&lt;/p&gt;

&lt;p&gt;I'll need to eventually handle more than just an &lt;code&gt;isSelected&lt;/code&gt; state, this is just a simple demo, but I can't figure out a good way to do this.&lt;/p&gt;

&lt;p&gt;I could write my own logic to determine if a parent node needs to render but it would need know if any child nodes have changed state. A recursive check is bad, so I was thinking of setting some kind of &lt;code&gt;isDirty&lt;/code&gt; flag on parent nodes, but being fairly new to react I don't know if there are better ways.&lt;/p&gt;

&lt;p&gt;I'm hoping to avoid third party libraries as I'd like for this to be a public library eventually.&lt;/p&gt;

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