<?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: Ahmad Muhammad Tijjani</title>
    <description>The latest articles on DEV Community by Ahmad Muhammad Tijjani (@teejay_tech).</description>
    <link>https://dev.to/teejay_tech</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2957980%2Ff933261f-e06e-47be-8ef9-8c3ee2391eea.jpeg</url>
      <title>DEV Community: Ahmad Muhammad Tijjani</title>
      <link>https://dev.to/teejay_tech</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/teejay_tech"/>
    <language>en</language>
    <item>
      <title>Debugging My Way Through a React Currency Converter: 3 Bugs, 3 Lessons</title>
      <dc:creator>Ahmad Muhammad Tijjani</dc:creator>
      <pubDate>Wed, 05 Aug 2026 16:45:12 +0000</pubDate>
      <link>https://dev.to/teejay_tech/debugging-my-way-through-a-react-currency-converter-3-bugs-3-lessons-37g3</link>
      <guid>https://dev.to/teejay_tech/debugging-my-way-through-a-react-currency-converter-3-bugs-3-lessons-37g3</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/bugsmash"&gt;DEV's Summer Bug Smash: Clear the Lineup&lt;/a&gt; powered by &lt;a href="https://sentry.io/" rel="noopener noreferrer"&gt;Sentry&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Overview
&lt;/h2&gt;

&lt;p&gt;While building a Currency Converter using React, I ran into a series of bugs during development — mostly around component structure, API data handling, and DOM element identity. Fixing them taught me a lot about how React state, custom hooks, and unique keys actually work under the hood.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug Fix or Performance Improvement
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Bug 1: Duplicated Input Box&lt;/strong&gt;&lt;br&gt;
I accidentally duplicated the input box component instead of rendering it once in App.jsx. This caused two identical input fields to appear instead of one connected field. The fix was tracing back to where the component was being called and removing the duplicate render, keeping a single source of truth in App.jsx.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug 2: &lt;code&gt;undefined&lt;/code&gt; Values from the API Response&lt;/strong&gt;&lt;br&gt;
My custom hook was fetching currency data, but the endpoint returned the data nested inside an object rather than a flat array. I initially tried accessing the currency keys directly in App.jsx the way I expected — which returned undefined. The issue was that I needed to access the first key of the response object inside the hook before passing usable data back out. Once I traced the actual shape of the response (using console.log), I fixed the hook to correctly parse and return the right key.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bug 3: Misusing &lt;code&gt;useId&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
I mistakenly used React's useId hook to assign identifiers to HTML elements the way I would use a regular id attribute, which caused unexpected behavior across elements. I learned useId is meant specifically for accessibility (linking labels/inputs), not as a general-purpose unique key or DOM identifier, and adjusted my usage accordingly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;a href="git@github.com:Ahmad012732/currency-converter.git"&gt;view the code on Github&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My Improvements
&lt;/h2&gt;

&lt;p&gt;This project turned into more of a debugging exercise than I expected, but each bug taught me something concrete:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Component structure matters&lt;/strong&gt; — duplicating a component instead of reusing it from a single source (App.jsx) creates hard-to-trace UI bugs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Always log the actual shape of API data&lt;/strong&gt; — assumptions about response structure (flat vs. nested) will silently break your code with undefined values. console.log early and often.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Know what a hook is actually for&lt;/strong&gt; — useId looks like it could double as a general unique identifier, but it's built specifically for accessibility, not for general-purpose keys or DOM ids.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these were huge, dramatic bugs — but fixing them forced me to slow down, read error behavior carefully, and actually understand why something wasn't working instead of guessing.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>bugsmash</category>
    </item>
    <item>
      <title>Currency Converter</title>
      <dc:creator>Ahmad Muhammad Tijjani</dc:creator>
      <pubDate>Wed, 05 Aug 2026 16:18:27 +0000</pubDate>
      <link>https://dev.to/teejay_tech/currency-converter-4kgf</link>
      <guid>https://dev.to/teejay_tech/currency-converter-4kgf</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsq768qmemojbk7zo307b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsq768qmemojbk7zo307b.png" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;br&gt;
Built a Currency Converter with React! 💱&lt;/p&gt;

&lt;p&gt;The latest addition to my JavaScript Learning Journey — a simple currency converter built using React.&lt;/p&gt;

&lt;p&gt;Not a huge project, but it helped me get more comfortable with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Managing state with useState&lt;/li&gt;
&lt;li&gt;Fetching real-time exchange rates from a currency API&lt;/li&gt;
&lt;li&gt;Building a custom hook to handle the API logic and keep the component clean&lt;/li&gt;
&lt;li&gt;Handling user input and controlled forms&lt;/li&gt;
&lt;li&gt;Conditional rendering for results&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's a small step, but each project is building my confidence with React fundamentals one piece at a time.&lt;/p&gt;

&lt;p&gt;Code is up on GitHub if you want to check it out — feedback always welcome! 🙌&lt;/p&gt;

&lt;h1&gt;
  
  
  webdev #react #programming #beginners
&lt;/h1&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>opensource</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
