<?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>Forem: Nina Ricci</title>
    <description>The latest articles on Forem by Nina Ricci (@ninariccimarie).</description>
    <link>https://forem.com/ninariccimarie</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%2F48378%2Fbca43c1f-7297-4d22-8d06-caf5a3118b93.jpeg</url>
      <title>Forem: Nina Ricci</title>
      <link>https://forem.com/ninariccimarie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ninariccimarie"/>
    <language>en</language>
    <item>
      <title>How to Trigger React Error Boundary with React Developer Tools</title>
      <dc:creator>Nina Ricci</dc:creator>
      <pubDate>Sun, 17 Jul 2022 11:46:16 +0000</pubDate>
      <link>https://forem.com/ninariccimarie/how-to-trigger-react-error-boundary-with-react-developer-tools-1ccg</link>
      <guid>https://forem.com/ninariccimarie/how-to-trigger-react-error-boundary-with-react-developer-tools-1ccg</guid>
      <description>&lt;h2&gt;
  
  
  What is a React Error Boundary?
&lt;/h2&gt;

&lt;p&gt;According to react.js documentation, Error boundaries are React components that catch JavaScript errors anywhere in their child component tree, log those errors, and display a fallback UI instead of the component tree that crashed. Error boundaries catch errors during rendering, in lifecycle methods, and in constructors of the whole tree below them. (&lt;a href="https://reactjs.org/docs/error-boundaries.html" rel="noopener noreferrer"&gt;Read more&lt;/a&gt;)&lt;/p&gt;

&lt;h2&gt;
  
  
  Use case
&lt;/h2&gt;

&lt;p&gt;We want to test how our application handles error states. Using the React Developer Tools, we won't be needing to manually force an error state in our code for each component we want to test. Instead, we can just select a component from the tool and force it to be in an error state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;React Developer Tools chrome extension

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://chrome.google.com/webstore/detail/react-developer-tools" rel="noopener noreferrer"&gt;installation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;A working React App with React Error Boundary&lt;/li&gt;

&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Start your React Application and open it on your Google Chrome web browser. (make sure you already have React Developer Tools chrome extension installed)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Open your Chrome Developer Tools and navigate to &lt;strong&gt;Components&lt;/strong&gt; tab.&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

shift + CTRL + J (Windows/Linux).
option + ⌘ + J (macOS)
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3. Select a component within the Error Boundary in the tree.
  - Notice the (!) icon. Hovering it should show a help dialog **"Force the selected component into an errored state"**

    ![Chrome Developer Tools with an open Components tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3rwp4j5skdcb0l4a4n3z.png)
4. Click on the (!) icon
  - This will force your app to be in an errored state
    ![React App in Error state](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k3w269zkl88e4etcf52i.png)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>guide</category>
      <category>react</category>
      <category>tips</category>
    </item>
    <item>
      <title>Git Conflicts; Fixing it with Git Rebase</title>
      <dc:creator>Nina Ricci</dc:creator>
      <pubDate>Mon, 07 Feb 2022 09:43:48 +0000</pubDate>
      <link>https://forem.com/ninariccimarie/git-conflicts-fixing-it-with-git-rebase-482n</link>
      <guid>https://forem.com/ninariccimarie/git-conflicts-fixing-it-with-git-rebase-482n</guid>
      <description>&lt;p&gt;Getting past the basic git clone, commit, add, pull and push, I have learned a few good to know git commands over the years because of repeatedly common problems I've faced when doing version control. I'm planning to create a series for this topic in hopes that this can also help you.&lt;/p&gt;

&lt;p&gt;Here's a very short story of how a Git conflict can happen and how to fix it with Git rebase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Git Conflicts
&lt;/h2&gt;

&lt;p&gt;Usually, these problems are faced when the team gets bigger and a lot more devs are contributing to the same project on the same file.&lt;/p&gt;

&lt;h3&gt;
  
  
  2 devs working on the same file.
&lt;/h3&gt;

&lt;p&gt;This is very common and it's okay, so don't worry! What I usually do is to plan ahead with the other dev so we know both of us are working on this specific same file. To minimize merge conflicts and efficiently fix them, we want to always rebase from develop whenever there are any changes so we always have an updated version of the base branch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DAY 1 🌞&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--eTNDINcT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3zec5ys9xgujbw8tv72r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--eTNDINcT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3zec5ys9xgujbw8tv72r.png" alt="Dev 1 and 2 creates feature branches" width="291" height="254"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  dev 1 creates and works on &lt;strong&gt;feature A&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout develop
git branch &lt;span class="nt"&gt;-b&lt;/span&gt; feature/feature-a
&lt;span class="c"&gt;# work on file A&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  dev 2 creates and works on &lt;strong&gt;feature B&lt;/strong&gt;
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout develop
git branch &lt;span class="nt"&gt;-b&lt;/span&gt; feature/feature-b
&lt;span class="c"&gt;# work on file A&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MzprBLrt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n5lq3dcbrs9lfqlhshy8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MzprBLrt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n5lq3dcbrs9lfqlhshy8.png" alt="Feature B is merged to develop branch and Dev 1 commits all their changes" width="345" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;in between the day, dev 2 who was working on feature B asks for a code review and merges their branch to develop. dev 1 who is working on feature A git add and commits all their changes for the day.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DAY 2 🌞&lt;/strong&gt;&lt;br&gt;
since, dev 2's branch (feature B) was merged to develop and we know that both devs had worked on the same file, dev 1 (feature A) will now rebase from develop branch to have an updated copy on their current feature branch and fix the conflicts.&lt;/p&gt;
&lt;h4&gt;
  
  
  dev 1, feature A rebases from develop and fixes conflicts
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# don't forget to git add and commit your changes first&lt;/span&gt;
git checkout develop
git pull origin develop
git checkout feature/feature-a
git rebase develop
&lt;span class="c"&gt;# by this time, git will write your commits on top of develop &lt;/span&gt;
&lt;span class="c"&gt;# and you will be seeing the conflicted files&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;go to the conflicted file and if needed, consult with dev 2 and make sure you save the file where both changes are written.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# resolve conflicted file/s&lt;/span&gt;
git add path/to/file
git rebase &lt;span class="nt"&gt;--continue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;git rebase interactive should be done after you finish fixing the conflicted file and you are good to go. 👍&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uHeo1ViZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r9khlmol10iak9lta4bb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uHeo1ViZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r9khlmol10iak9lta4bb.png" alt="Feature A rebases on top of develop" width="494" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice that Feature A now is on top of both develop and Feature B that was merged the day before.&lt;/p&gt;

&lt;p&gt;Thank you for reading all the way here! I hope you've learned something new and that this can help you on your productivity and collaboration with your team 🤝 &lt;/p&gt;

</description>
      <category>git</category>
      <category>productivity</category>
      <category>tips</category>
    </item>
    <item>
      <title>How honesty can improve team productivity</title>
      <dc:creator>Nina Ricci</dc:creator>
      <pubDate>Thu, 07 May 2020 13:46:28 +0000</pubDate>
      <link>https://forem.com/ninariccimarie/how-honesty-can-improve-team-productivity-2llh</link>
      <guid>https://forem.com/ninariccimarie/how-honesty-can-improve-team-productivity-2llh</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j7S1iEoJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://images.unsplash.com/photo-1519389950473-47ba0277781c%3Fixlib%3Drb-1.2.1%26ixid%3DeyJhcHBfaWQiOjEyMDd9%26auto%3Dformat%26fit%3Dcrop%26w%3D2850%26q%3D80" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j7S1iEoJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://images.unsplash.com/photo-1519389950473-47ba0277781c%3Fixlib%3Drb-1.2.1%26ixid%3DeyJhcHBfaWQiOjEyMDd9%26auto%3Dformat%26fit%3Dcrop%26w%3D2850%26q%3D80" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How can being honest actually improve your team's productivity? Let me share with you a few scenarios where you may find yourself in and what you can do and why you should do it.&lt;/p&gt;

&lt;h2&gt;
  
  
  When you are stuck with your code for more than the usual time it will take to fix something.
&lt;/h2&gt;

&lt;p&gt;Be honest and tell your team you're stuck but make sure you've done your part in trying to fix it. With this, you're likely to progress faster if someone helps you. In fact, it's possible that someone from your team has already encountered it and the time you'll invest for like 1-2 hours could be lessened to a single question. &lt;/p&gt;

&lt;h2&gt;
  
  
  When something broke and you know it was you who broke it
&lt;/h2&gt;

&lt;p&gt;Be honest and volunteer to fix it. You'll probably take lesser time to fix it rather than someone who has little idea of the cause.&lt;/p&gt;

&lt;h2&gt;
  
  
  When you don't know the answer to a question
&lt;/h2&gt;

&lt;p&gt;Be honest and tell the person you don't know but try to find the answer after. It's better to tell upfront that you don't know rather than assume something and cause a misunderstanding.&lt;/p&gt;

&lt;h2&gt;
  
  
  If no one has been honest yet, be the first one
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--44J-Ysxl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://images.unsplash.com/photo-1584907797015-7554cd315667%3Fixlib%3Drb-1.2.1%26ixid%3DeyJhcHBfaWQiOjEyMDd9%26auto%3Dformat%26fit%3Dcrop%26w%3D1655%26q%3D80" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--44J-Ysxl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://images.unsplash.com/photo-1584907797015-7554cd315667%3Fixlib%3Drb-1.2.1%26ixid%3DeyJhcHBfaWQiOjEyMDd9%26auto%3Dformat%26fit%3Dcrop%26w%3D1655%26q%3D80" alt=""&gt;&lt;/a&gt;&lt;br&gt;
Other members can feel comfortable being honest themselves if someone within the team continuously do so. Everyone would feel that they can trust each other. The feeling of not being discriminated of not knowing or of making mistakes can improve the team's communication. Anyone could learn a thing or two just by someone saying "I don't know" or "I'm stuck. Can someone help me?". And without you knowing it, honesty has become one of your team culture.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>team</category>
      <category>learning</category>
      <category>tips</category>
    </item>
  </channel>
</rss>
