<?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: DaCastle</title>
    <description>The latest articles on DEV Community by DaCastle (@dacastle).</description>
    <link>https://dev.to/dacastle</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%2F359246%2F4db5cd85-5128-408f-b0a2-d88244fefd4b.jpeg</url>
      <title>DEV Community: DaCastle</title>
      <link>https://dev.to/dacastle</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dacastle"/>
    <language>en</language>
    <item>
      <title>Awareness is Huge</title>
      <dc:creator>DaCastle</dc:creator>
      <pubDate>Thu, 30 Apr 2020 01:14:38 +0000</pubDate>
      <link>https://dev.to/dacastle/awareness-is-huge-2ng1</link>
      <guid>https://dev.to/dacastle/awareness-is-huge-2ng1</guid>
      <description>&lt;p&gt;In addition to being able to learn and improve your dev skills, very important factors for being more likeable and progressing your career are:&lt;/p&gt;

&lt;p&gt;1) being able to identify other people's preferences, likes and dislikes&lt;br&gt;
2) intentionally moulding how others see you&lt;/p&gt;

&lt;p&gt;Every single word you say, every word you don't say, every laugh, every smile, every frown, every yes, every no, whether you say 'yes', 'ya', 'yep' or 'yea', will alter how people think about you, consciously or subconsciously, for better or worse.&lt;/p&gt;

&lt;p&gt;Essentially, treat all of your coworkers as if they are someone you are interested in getting to know well.&lt;/p&gt;

&lt;p&gt;Things to pay attention to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What ruins their day? No morning coffee? late night deployments? Sitting in meetings? Listening to Fred talk for more than 4 minutes?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What results in a good mood? A good dinner the night before? Watching Netflix for 7 hours? Finishing a feature? Hanging out with friends?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;What do they like to do in their free time? Most people welcome an opportunity to talk about things they enjoy&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;does Tom like to chit-chat before getting asked work questions? Does he prefer to have you get straight to the point?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When Tom is having a bad day, does any of ^that^ change? What about a great day?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;does Tom prefer to be emailed, or pinged on Slack?&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You have the opportunity to present a slightly different version of yourself to each person you interact with, and I recommend doing so.&lt;/p&gt;

&lt;p&gt;The takeaway from this is that whether you decide to work on becoming more aware of how others perceive you or not, does not change the fact that people's perceptions of you have the potential to change every single day, and you have the opportunity to make the most of it.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>productivity</category>
    </item>
    <item>
      <title>React + Redux ? Selectors inbound</title>
      <dc:creator>DaCastle</dc:creator>
      <pubDate>Sat, 11 Apr 2020 22:36:42 +0000</pubDate>
      <link>https://dev.to/dacastle/react-redux-selectors-inbound-395a</link>
      <guid>https://dev.to/dacastle/react-redux-selectors-inbound-395a</guid>
      <description>&lt;p&gt;I don't like diluting quality content, so I will be brief and link to a great article on the benefits of adding selectors to a react/redux application and how to do so.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;&lt;u&gt;Selectors:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;act as a single-source-of-truth when mapping to your mapStateToProps() (very useful if being referenced in many components)&lt;/li&gt;
&lt;li&gt;handle the logic for determining what state data you want, making your components less complex&lt;/li&gt;
&lt;li&gt;can increase performance by only performing computation if the state arguments it is passed have changed since last time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://daveceddia.com/redux-selectors/"&gt;Redux Selectors: A Quick Tutorial&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note - Only worry about this if you are already proficient with React and Redux&lt;/em&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>State Management - Redux or MobX?</title>
      <dc:creator>DaCastle</dc:creator>
      <pubDate>Sat, 04 Apr 2020 16:55:17 +0000</pubDate>
      <link>https://dev.to/dacastle/state-management-redux-or-mobx-24lf</link>
      <guid>https://dev.to/dacastle/state-management-redux-or-mobx-24lf</guid>
      <description>&lt;p&gt;Coming into my current React project mid-development, I didn't have proficiency with either Redux or MobX, and our project used Redux, so I got accustomed to it.&lt;/p&gt;

&lt;p&gt;Now that I have a firm grasp of Redux, I took some time to look at alternatives so I could have additional insight moving forward.&lt;/p&gt;

&lt;p&gt;Linking an article I thought did a good job comparing these two main state management contenders, both in concept and in code snippets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.sitepoint.com/redux-vs-mobx-which-is-best"&gt;Redux vs MobX: Which Is Best for Your Project?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Conclusion:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;'Clearly, you can see that MobX’s code base is far much leaner. Using OOP style and good development practices, you can rapidly build applications. The major downside is that it’s very easy to write poor, unmaintainable code.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Redux, on the other hand, is more popular and well suited for building large and complex projects. It’s a strict framework with safeguards ensuring every developer writes code that’s easy to test and maintain. However, it’s not well suited to small projects.'&lt;/em&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>mobx</category>
    </item>
    <item>
      <title>Immer or Immutable for Redux Reducers?</title>
      <dc:creator>DaCastle</dc:creator>
      <pubDate>Thu, 02 Apr 2020 01:37:46 +0000</pubDate>
      <link>https://dev.to/dacastle/immer-or-immutable-for-redux-reducers-4ohi</link>
      <guid>https://dev.to/dacastle/immer-or-immutable-for-redux-reducers-4ohi</guid>
      <description>&lt;p&gt;What I was trying to achieve were cleaner, more intuitive Redux reducer files for my application. I noticed there was a ton of bloat with having to worry about not mutating the current state of the store or state objects before updating it. It gets ugly fast:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;case USER_CLICKED_CHECKOUT:
return {
    ...state,
    checkoutCart : {
        ...state.checkoutCart,
        isCheckingOut : true
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's to update a single variable. 1 line for the case, 2 for the return block, 4 for preventing mutations, and 1 for the value update.&lt;/p&gt;

&lt;p&gt;With Immer, this turns into:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;case USER_CLICKED_CHECKOUT
draft.checkoutCart.isCheckingOut = true
return
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;1 line for the case, 1 for the return, and 1 for the value update.&lt;br&gt;
That's much cleaner AND more apparent what the desired intent is.&lt;/p&gt;

&lt;p&gt;From the resources I've looked into so far, in regards to Redux Reducers, Immer is the cleanest tool to reduce bloat and make reducer logic more intuitive.&lt;/p&gt;

&lt;p&gt;Here is a post by Chris Vibert where he gave some succinct reasons against Immutable, and &lt;em&gt;for&lt;/em&gt; Immer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/better-programming/try-these-instead-of-using-immutable-js-with-redux-f5bc3bd30190"&gt;Try These Instead of Using Immutable.js With Redux&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Redux weighing in on adding Immutable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://redux.js.org/recipes/using-immutablejs-with-redux#using-immutablejs-with-redux"&gt;Using Immutable.JS with Redux&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Immer vs Immutable npm trends&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.npmtrends.com/immutable-vs-immer"&gt;Immer vs Immutable&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As my bio says, I'm always up for learning, so I'd love to hear from others on whether Immer is the best solution for this use case, or if Immutable (or another tool) is a better alternative?&lt;/p&gt;

</description>
      <category>immer</category>
      <category>immutable</category>
      <category>redux</category>
      <category>react</category>
    </item>
  </channel>
</rss>
