<?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: Domnic Omondi</title>
    <description>The latest articles on DEV Community by Domnic Omondi (@domooh9).</description>
    <link>https://dev.to/domooh9</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%2F873111%2Fa499e81a-93b6-4ff3-8252-6ad72c5b26d7.jpg</url>
      <title>DEV Community: Domnic Omondi</title>
      <link>https://dev.to/domooh9</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/domooh9"/>
    <language>en</language>
    <item>
      <title>A deep dive into UseTranslation hook.</title>
      <dc:creator>Domnic Omondi</dc:creator>
      <pubDate>Wed, 26 Apr 2023 14:57:19 +0000</pubDate>
      <link>https://dev.to/domooh9/a-deep-dive-into-usetranslation-hook-5ja</link>
      <guid>https://dev.to/domooh9/a-deep-dive-into-usetranslation-hook-5ja</guid>
      <description>&lt;p&gt;As I was working on a Next.js project, I came across the useTranslation hook, which I was curious to know more about. In this blog, I will be talking about what the &lt;em&gt;useTranslation&lt;/em&gt; hook is and how it can be used in React applications for localization and internationalization.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;What is UseTranslation Hook?&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;useTranslation is a hook provided by the react-i18next library, which is widely used for internationalization and localization in React applications. This hook allows developers to access the translation functionality provided by the i18next library directly in their React components. The useTranslation hook takes no parameters and returns an object with two properties - t and i18n.&lt;/p&gt;

&lt;p&gt;The 't' property is responsible for the translation of strings in the specified language. The 'i18n' property is responsible for setting the desired language and managing locale files.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;How to use UseTranslation Hook?&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Before using useTranslation hook, your first step is to ensure that the i18next and react-i18next packages are installed and properly configured in your React project, you can follow instructions on how to install it here(&lt;a href="https://www.npmjs.com/package/react-i18next"&gt;https://www.npmjs.com/package/react-i18next&lt;/a&gt;). Once you have installed and configured the packages, you can use the useTranslation hook in your React components as follows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sBuhHaoS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i6c51kledwk3akepuc56.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sBuhHaoS--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i6c51kledwk3akepuc56.png" alt="Image description" width="423" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The useTranslation hook provides the t function, which accepts a string representing the text to be translated. This string is passed as an argument to the t function, which then returns the translated text.&lt;/p&gt;

&lt;p&gt;The useTranslation hook also provides the i18n property, which can be used to set the desired language for your application, manage the caching of translations, and specify various configuration settings.&lt;/p&gt;

&lt;p&gt;Remember, useTranslation hook is an essential tool for internationalizing and localizing React apps. With it, developers can easily manage translations within their components, making it easier to develop multilingual web applications.&lt;/p&gt;

&lt;p&gt;To use useTranslation hook, both i18next and react-i18next should be configured and installed in your React application.&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Why I got sucked only 2 weeks into my junior developer job and what I learned.</title>
      <dc:creator>Domnic Omondi</dc:creator>
      <pubDate>Tue, 25 Apr 2023 16:19:13 +0000</pubDate>
      <link>https://dev.to/domooh9/why-i-got-sucked-only-2-weeks-into-my-junior-developer-job-and-what-i-learned-14dd</link>
      <guid>https://dev.to/domooh9/why-i-got-sucked-only-2-weeks-into-my-junior-developer-job-and-what-i-learned-14dd</guid>
      <description>&lt;p&gt;Being a junior developer is tough. You’re new to the game, trying to navigate the world of coding and development while also trying to impress your employer with your skills and knowledge. But what happens when you’re sucked from a remote job only 2 weeks after starting the job? It can be devastating, especially when the reasons for getting sucked seem petty or insignificant.&lt;/p&gt;

&lt;p&gt;In my case, I was sucked from my first remote job as a junior developer after only 2 weeks. The reasons given to me were that my commit messages were poor, I was using a line spacing of 2 instead of 4 and I took long to deliver a working login page which was more of a backend problem than mine because the API endpoint was not working. I was confused at first and hurt by these reasons, I tried to ask for a second chance but it was too late because my replacement was already on standby. I was new to this job and this was my first time working remotely. I didn't realize that these small things could cause such a big problem.&lt;/p&gt;

&lt;p&gt;As time passed, I began to see why my employer was unhappy with my performance and I knew it was over for me the day I received a long voice note from my boss. My commit messages were indeed long and poor, it made it difficult for my team to understand what I was working on or what changes I had made. This made it challenging for them to review my work and offer feedback. On top of that, using a line spacing of 2 instead of 4 may have seemed harmless, but it made my code difficult to read, edit and merge with the main branch. My last two commits before getting sucked were much better and I thought I was progressing well but maybe it was already too late to make things right&lt;/p&gt;

&lt;p&gt;As a junior developer who was still learning how to communicate my work effectively and present my code in a readable format. But my employer and seniors had a responsibility to share feedback on areas where I could improve, even if it seems small or insignificant.&lt;/p&gt;

&lt;p&gt;Getting sucked from a remote job as a junior developer taught me valuable lessons about the importance of attention to detail, collaboration, and communication which was my biggest problem, I didn't know how to effectively express myself and explain what was going on or what I was up to. It also taught me the value of taking ownership of my mistakes and working hard to correct them.&lt;/p&gt;

&lt;p&gt;In conclusion, being sucked from a remote job as a junior developer and worse after only 2 weeks can be discouraging, but it's important to take the situation as a learning experience. Be keen on small details, and work on your soft skills as much as your hard skills, soft skills like effective communication, and collaboration with your team ensure that expectations are met. In the end, it will be worth the effort to become a better developer and excel in your career.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Yarn or Npm</title>
      <dc:creator>Domnic Omondi</dc:creator>
      <pubDate>Sat, 08 Oct 2022 06:23:17 +0000</pubDate>
      <link>https://dev.to/domooh9/yarn-or-npm-4gfa</link>
      <guid>https://dev.to/domooh9/yarn-or-npm-4gfa</guid>
      <description>&lt;p&gt;Yarn (&lt;em&gt;Yet Another Resource Negotiator&lt;/em&gt;) was developed in 2016 by facebook to replace Npm, the main idea for the design was to provide a package manager which offers many features that Npm lacked. Npm has however added many features and thus makes yarn more of an alternative than a replacement. &lt;/p&gt;

&lt;p&gt;Npm(&lt;em&gt;Node package manager&lt;/em&gt;) is the default package manager for Node.js, it has a command line interface that enables install, removal, and management of Node.js packages. It is included by default with Node.js and it doesn't require additional installation steps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Comparison&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Speed: as Yarn downloads packages, it caches them to avoid to avoid downloading same package twice. Npm downloads packages sequentially. Yarn is faster when downloading larger files while Npm one the other hand is slower when downloading larger files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Security: yarn verifies integrity of installed packages using checksum before the codes are executed. Npm verifies using the &lt;em&gt;SHA-512&lt;/em&gt; stored in the package-lock.json file.     &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Which one to Use&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yarn is new and it is gaining popularity fast, it has features has features which are advanced such as &lt;em&gt;Plug’n’Play&lt;/em&gt; and &lt;em&gt;Zero-Install to offer&lt;/em&gt; that improves performance and security marginally but consumes more disk space.&lt;br&gt;
Npm uses less disk space and it is preferred by developers who are used to how the older versions work and are happy with the current workflow.&lt;/p&gt;

&lt;p&gt;In conclusion, it is upon the developers to choose the one which work well for them.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Hoisting in Javascript</title>
      <dc:creator>Domnic Omondi</dc:creator>
      <pubDate>Mon, 27 Jun 2022 21:34:49 +0000</pubDate>
      <link>https://dev.to/domooh9/hoisting-in-javascript-5585</link>
      <guid>https://dev.to/domooh9/hoisting-in-javascript-5585</guid>
      <description>&lt;p&gt;Hoisting is the ability of javascript interpreter to call functions,variables or classes before they appear in the code or before execution of the code. &lt;br&gt;
Hoisting allows you to use functions, variables or classes before declaring them.&lt;/p&gt;

&lt;p&gt;example with Hoisting&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NyUfU0Lw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b13621f58vmjzh0uc76c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NyUfU0Lw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b13621f58vmjzh0uc76c.png" alt="Image description" width="429" height="126"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How you would write the same code without HOISTING&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R3ildC1y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/keb94gzf2qdwvw2pllrc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R3ildC1y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/keb94gzf2qdwvw2pllrc.png" alt="Image description" width="442" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
