<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Victorotieno on Medium]]></title>
        <description><![CDATA[Stories by Victorotieno on Medium]]></description>
        <link>https://medium.com/@victorotieno598?source=rss-827e1c8542b8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Jv5yAicYl_BQeaqN</url>
            <title>Stories by Victorotieno on Medium</title>
            <link>https://medium.com/@victorotieno598?source=rss-827e1c8542b8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 06:15:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@victorotieno598/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The magic of react-query (useQuery)]]></title>
            <link>https://medium.com/@victorotieno598/the-magic-of-react-query-usequery-146ef1560141?source=rss-827e1c8542b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/146ef1560141</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react-query]]></category>
            <dc:creator><![CDATA[Victorotieno]]></dc:creator>
            <pubDate>Wed, 20 Jul 2022 18:47:53 GMT</pubDate>
            <atom:updated>2022-07-20T18:47:53.127Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*cqVn3rcxH3-LeQuvQX-7jw.png" /><figcaption>Simple Todo App</figcaption></figure><p>Yeah, another todos app. I can only imagine what’s going on in your mind. Guess what, you are absolutely right. But before you navigate away, maybe you are curious to know why I’ve written about yet another cliché of an app. Disclaimer, this article is aimed at beginners, otherwise, let’s hit the ground. I’m going to be honest, I awe most of my tech skills to random YouTube tutorials, I’ve subscribed to over fifty channels just to ensure that I don’t miss out on new techs, updates or trends in the industry. And yes, I’m lazy especially when it comes to reading actual tech documentations. This is a weakness that I’m currently trying fix. Luckily, there are so many of us out there.</p><p><strong>Requirements</strong></p><p>· <a href="https://nodejs.org/en/">Nodejs</a></p><p>· <a href="https://reactjs.org/docs/create-a-new-react-app.html">Reactjs</a> (create-react-app)</p><p>This is a simple Todos application that uses.</p><blockquote>Todos data from <a href="https://jsonplaceholder.typicode.com/todos">https://jsonplaceholder.typicode.com/todos</a>.</blockquote><blockquote>Bootstrap classes from <a href="https://getbootstrap.com/docs/5.2/getting-started/download/">https://getbootstrap.com/docs/5.2/getting-started/download/</a></blockquote><p>Add css bootstrap cdn link to /pulic/index.html in the head section as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*wTZHORqFiUuZPERwU7C9vg.png" /><figcaption>Index.js</figcaption></figure><p>I first used fetch data using <strong>useEffect</strong> then refactor it later.</p><p>This is my folder structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*47x_fichVWIllC2GOtQFhw.png" /><figcaption>App Structure</figcaption></figure><p>Header.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*FUB9GDUsI9QgzSB2B_KlRQ.png" /><figcaption>Header.js</figcaption></figure><p>The content of src/utils/fetchWrapper.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*J34hyrGfeS7SdIQBV222xA.png" /><figcaption>fetchWrapper.js</figcaption></figure><p>I have limited my todo data to 10 instead of the default 200 that the endpoints returns.</p><p>I intially used <a href="https://reactjs.org/docs/hooks-state.html"><strong>useState</strong></a> and<a href="https://reactjs.org/docs/hooks-effect.html"> <strong>useEffect</strong></a><strong> </strong>to write the logic in the Todos component as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*7P8Ad38KBtolLdOKStVslA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*Et1Kj3aqVyVFDeE1C2D2kQ.png" /></figure><p>So far, nothing out of the ordinary. How would you refactor such a basic app? React redux, maybe, but it feels like an overkill in this case. I opted for <a href="https://tanstack.com/query/v4/docs/overview">useQuery</a>.</p><h3><a href="https://tanstack.com/query/v4/docs/overview">useQuery</a></h3><blockquote>It starts with a simple `<strong>npm install react-query</strong>`. React query is a hook used for caching, mutatig, setting global state, pre-fetching so that the application can update stale data in the background.</blockquote><p><strong>Refactoring</strong><br> Then refactoring our Index.js as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*OYEZMkH0Qvpz1sMExfMZew.png" /><figcaption>Index.js</figcaption></figure><p>I’ll fetch my todo list from App.js, but you can do it in any component as you wish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*de6bPouJugIyYdio0jRM2Q.png" /><figcaption>App.js</figcaption></figure><p>Todos.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cnBfheC9-YWPBRczZ9zdwg.png" /><figcaption>Todos.js</figcaption></figure><p>Todo.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*KKu9Ah8MTknwXPxNZOYpUg.png" /><figcaption>Todo.js</figcaption></figure><p>Details.js</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HsPwMVzLMrIoBtjXzJqWyw.png" /><figcaption>Details.js</figcaption></figure><p>For the complete code, <br><a href="https://github.com/vikitaotiz/Todos-App-React-Query.git">https://github.com/vikitaotiz/Todos-App-React-Query.git</a><br>Your feedback will be highly appreciated.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=146ef1560141" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript: Difference between null and undefined.]]></title>
            <link>https://medium.com/@victorotieno598/javascript-difference-between-null-and-undefined-7e718e35efa9?source=rss-827e1c8542b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e718e35efa9</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Victorotieno]]></dc:creator>
            <pubDate>Fri, 08 Oct 2021 20:38:52 GMT</pubDate>
            <atom:updated>2021-10-08T20:51:31.357Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*aZoIeHD4h6ZirMF_KeT0bg.png" /></figure><p>Hehe, I thought I knew javascript until I attended an interview and they asked me to explain the difference between “null” and “undefined”… <br>Have you ever gone totally blank in front of a panel?<br>This is a JavaScript feature that I use or encounter almost daily. Turns out that both null and undefined are ways of representing a no value situation. Meaning if I use an equality operator ( == ) to compare them, it will return true. But null is normally used by a programmer to explicitly assign no value to a variable while undefined is used implicitly by the JavaScript engine itself to implicitly assign no value to a variable. These two primitive data types are used to accomplish similar tasks but are not technically the same. Null returns an object if you run it using “typeof” function while undefined returns undefined, huh!.<br>Am still trying to wrap my head around how I missed these.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*ObmqGtaoD2-7BNRsLvVivg.png" /><figcaption>Comparison of null and undefined using the equality operator</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*6iYSV6FquEgbL8I7MvrT3Q.png" /><figcaption>Testing the data type of JavaScript’s null type</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*ZyxWGk_glP7-H4OALtsdKQ.png" /><figcaption>Testing the data type of javascript’s undefined type</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*fSCBAi3dCTPG9_fam_sEQA.png" /><figcaption>Comparing Null and Undefined JavaScript’s type using the strict equality</figcaption></figure><p>Null and Undefined types are part of JavaScript’s primitive data types.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e718e35efa9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My software development journey.]]></title>
            <link>https://medium.com/@victorotieno598/my-software-development-journey-223ce9210cf2?source=rss-827e1c8542b8------2</link>
            <guid isPermaLink="false">https://medium.com/p/223ce9210cf2</guid>
            <category><![CDATA[microverse]]></category>
            <category><![CDATA[full-stack]]></category>
            <category><![CDATA[junior-developer]]></category>
            <dc:creator><![CDATA[Victorotieno]]></dc:creator>
            <pubDate>Fri, 01 Oct 2021 20:32:41 GMT</pubDate>
            <atom:updated>2021-10-02T09:10:17.749Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*TWgJ9URYAY6HvSrQt5guCg.jpeg" /></figure><p>What does it really take for a beginner to learn how to code and become an expert? A while back this statement never made any sense to me. I would try learning it on my own from youtube tutorials and other online resources, but I constantly kept giving up especially after encountering a blocker.</p><p>After so many fruitless attempts, I came across a Microverse advert and I decided to give it a try. The trials were a bit tough but it was an opportunity for me to test my skills that time. Luckily, I got accepted into the program. Ironically, things didn’t get any better but I have learned so much especially teamwork, remote development and collaboration, professionalism, and how to search for solutions whenever I get stuck. I have also acquired skills such as problem-solving, critical thinking, and patience.</p><p>The first time I created a full website, using HTML, CSS, and Javascript felt like magic. As a beginner developer, I got stuck many times, sometimes on simple tasks such as creating folder structure for my application. I practiced a lot, I repeated the tasks over and over until it became my second nature. My morning stand-up group came in handy by giving me feedback solutions to my blockers. Microverse teaches you to realize that no one is perfect and it’s absolutely ok to reach out to other teammates for help whenever you get stuck. This saves you time, gives you an opportunity to learn and share from others.</p><p>Sometimes passion and motivation are not enough for you to learn a new skill. Practice, consistency, and patience are required. Good teamwork will always enhance your communication skills, knowledge since you get to learn from others. It also makes one more attractive to potential employers since you can easily coalesce with people from different backgrounds and cultures. I can confidently say that I’m now a much better software developer than I was before I joined Microverse.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=223ce9210cf2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>