<?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 Jorge Mor on Medium]]></title>
        <description><![CDATA[Stories by Jorge Mor on Medium]]></description>
        <link>https://medium.com/@imgeorgemor?source=rss-8e5c86e3689c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*eHAGjiPVl10FdDhJJDhaTA.jpeg</url>
            <title>Stories by Jorge Mor on Medium</title>
            <link>https://medium.com/@imgeorgemor?source=rss-8e5c86e3689c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 03:52:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@imgeorgemor/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[Don’t get fooled by useMemo or useCallback]]></title>
            <link>https://imgeorgemor.medium.com/dont-get-fooled-by-usememo-and-usecallback-and-avoid-unnecessary-optimizations-2e7e854b487c?source=rss-8e5c86e3689c------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e7e854b487c</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[optimization-techniques]]></category>
            <category><![CDATA[react-hook]]></category>
            <dc:creator><![CDATA[Jorge Mor]]></dc:creator>
            <pubDate>Sat, 17 Feb 2024 01:31:39 GMT</pubDate>
            <atom:updated>2024-05-26T11:56:37.279Z</atom:updated>
            <content:encoded><![CDATA[<h3>Don’t get fooled by useMemo and useCallback and avoid unnecessary optimizations</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BY3jtU3xz2MvPz4Nm9AC4g.png" /><figcaption><em>All the cover images of my posts are a true work of art. Credits to Fireship for this amazing cover.</em></figcaption></figure><p>Within JavaScript and in particular React web environments most of the time you don’t need to optimise functions or values as long as React per se is a very optimized and fast library, though if you work in a medium-to large-scale applications there are big chances that you can describe some parts of your app as an “incomprehensible chain of useMemo and useCallbacks” that complicates the readability of the code. “Been there”.</p><p>Don’t worry “amigo” today we are gonna learn when to use each one (spoiler alert: 99% of the times you don’t need to implement any optimization and within React 19 next release memoization techniques will be applied at a compilation level), what is going on under the hood, and how measure the potential performance benefit to avoid our code looks like the above picture.</p><p><strong>Disclaimer:</strong> this article is more practical than a technical explanation, assuming you are familiar with useMemo and useCallback hooks, if not I highly recommend Kent C Dodds articles about memoization in React:</p><ul><li><a href="https://kentcdodds.com/blog/usememo-and-usecallback">When to useMemo and useCallback</a></li><li><a href="https://epicreact.dev/memoization-and-react/">Memoization and React</a></li></ul><h4>What is memoization in React?</h4><p>Let’s say you have a component with multiple states and some functions inside, when React checks for any state changes in a component, due to how JavaScript handles equality and shallow comparisons, will re-render the entire UI component and will unnecessary re-generate again all the functions and values inherent to that component. Such re-render most of the times only takes microseconds.</p><p>However, if by chance there is any expensive computation that kind of re-render could affect performance. That’s what memoization does in React, avoid the unnecessary re-renders of expensive computations and values.</p><h4>What are the ‘useMemo’ and ‘useCallback’ hooks?</h4><p>According to the official React documentation, useMemo is a React Hook that lets you cache the result of a calculation between re-renders. In other words, it memoize the value and avoid to re-build in between each render.</p><p>Meanwhile, useCallback is a combination of useMemo and a callback that lets you memoize not the result of the function but the function definition between re-renders. Both hooks are used to help improve performance.</p><h4>How do they work?</h4><p>On the first render, React executes and caches the returned value or function declaration. In re-renders, React uses the cached value instead of executing the function again (unless the values in provided dependencies array have changed). When the function is computationally expensive, not executing it every render could help improve performance. However memoizing comes with a cost, so the first render where React must memoize the value or function will take more time than a non-cached render.</p><h4>When should I use them?</h4><p>Write this down on a sticker and put it together with your grocery list: MOST OF THE TIME YOU SHOULD NOT BOTHER OPTIMIZING UNNECESSARY RERENDERS, PERIOD (sorry for the caps, not cool I know)</p><p>Consider this before answer when you should use them.</p><ol><li><strong>React, Virtual DOM and Reconciliation</strong></li></ol><p>React uses a Virtual DOM to optimize DOM manipulations which by default is very fast (between 1ms to 0.1ms). The first render React has to do more work compared to subsequent updates. The first render will take more time and the following are improved by 0.5 0.6ms by default.</p><p>Indeed, as from React 18 version, it batches state updates. When multiple state updates are triggered in quick succession (for example, in the same event loop), React groups these updates together and re-renders the component only once to reflect all these changes.</p><p>React implements event delegation at the root level. Instead of attaching event handlers to individual DOM elements, React attaches a single event listener to the root of the app. This approach reduces memory overhead and the number of event listeners.</p><p><strong>2. JavaScript Engine Optimizations</strong></p><p>Modern JavaScript engines like V8 (used in Chrome and Node.js), SpiderMonkey (Firefox), and JavaScriptCore (Safari) are designed to execute JavaScript code efficiently and optimize code execution over time. Instead of interpreting JavaScript code line-by-line, these engines compile the code to machine language just before it’s executed for the first time (Just-In-Time compilation), boosting performance significantly.</p><p><strong>3. Browser Rendering Optimizations</strong></p><p>Yes “amigo”, browsers also also employ several optimization strategies like layout recalculations, GPU accelerations (specially for CSS animations), and also optimizes event handling to minimize the overhead of attaching events to multiple DOM elements.</p><p>So the code you are trying to optimize is already improved in performance terms by React, JavaScript Engines and your own very browser.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F11qAyKz9AbFEYM%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fcommunity-spiderman-telltale-11qAyKz9AbFEYM&amp;image=https%3A%2F%2Fmedia0.giphy.com%2Fmedia%2Fv1.Y2lkPTc5MGI3NjExODBmZGFxY3VwMnI1cmhsYzlrdmRnYW9tZmpsODFhdTlibHk0ZGR4dSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw%2F11qAyKz9AbFEYM%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/f6d5bc108f65b79fc8b81fefe4c3ec85/href">https://medium.com/media/f6d5bc108f65b79fc8b81fefe4c3ec85/href</a></iframe><p>At this point I haven’t answered the question you are looking for: when should you use optimization techniques? Let’s start analyzing a repository from a real example where the Vercel friends use (probably wrong) memoization techniques:</p><h4>Real case example by Vercel (nothing personal, I love Vercel more than anything else)</h4><p>So the other day I was working on a new project using the Vercel’s blob database and while I was checking out the example the Vercel guys have on Github, I saw this:</p><pre>const onChangePicture = useCallback(<br>    (event: ChangeEvent&lt;HTMLInputElement&gt;) =&gt; {<br>      const file = event.currentTarget.files &amp;&amp; event.currentTarget.files[0]<br>      if (file) {<br>        if (file.size / 1024 / 1024 &gt; 50) {<br>          toast.error(&#39;File size too big (max 50MB)&#39;)<br>        } else {<br>          setFile(file)<br>          const reader = new FileReader()<br>          reader.onload = (e) =&gt; {<br>            setData((prev) =&gt; ({ ...prev, image: e.target?.result as string }))<br>          }<br>          reader.readAsDataURL(file)<br>        }<br>      }<br>    },<br>    [setData]<br>  )</pre><p>Check full repository here: <a href="https://github.com/vercel/examples/tree/main/storage/blob-starter">https://github.com/vercel/examples/tree/main/storage/blob-starter</a></p><p>There you go, memoization technique in the first file I opened. The before described code snippet memoizes a function that doesn’t fall in the use-cases of memoizing function definitions set by the React Team:</p><ul><li>If your app is like this site, and most interactions are coarse (like replacing a page or an entire section), memoization is usually unnecessary. On the other hand, if your app is more like a drawing editor, and most interactions are granular (like moving shapes), then you might find memoization very helpful.</li></ul><p>In the Vercel case, looks like uploading a picture is more like a one time action than a granular repetitive interaction that makes sense to be memoized, so the optimization applied could be deemed as unnecessary.</p><h4>Profiling</h4><p>React Dev tools include an outstanding plugin to collect timing information about each component that’s rendered in order to identify performance bottlenecks. So this plugin comes in hand in the very suitable moment to analyze our code performance.</p><p>Lets profile this uploader component: mount the component, add an image, change the image to another one, two or three times, and just test the component functionality. The profiler results show us the following render timing for the uploader component:</p><ul><li>1st render: 1.2ms</li><li>2nd render: 0.3ms</li><li>3rd render: 0.5ms</li><li>4th render: 0.4ms</li><li>5th render: 0.5ms</li></ul><p>As expected the first render React executes and caches the handle change image function. As commented before, the first render is the most expensive one as React has to mount the component and, in this case, caches the function inside the useCallback. As a consequence of this, subsequents re-renders are less expensive due to useCallback optimization, React inner performance features, JavaScript and browser performance features commented before (in this case I am using Chrome V121).</p><p>Now lets analyze the render timings without using useCallback:</p><pre>const onChangePicture = (event: ChangeEvent&lt;HTMLInputElement&gt;) =&gt; {<br>        const file = event.currentTarget.files &amp;&amp; event.currentTarget.files[0]<br>        if (file) {<br>            if (file.size / 1024 / 1024 &gt; 50) {<br>                toast.error(&#39;File size too big (max 50MB)&#39;)<br>            } else {<br>                setFile(file)<br>                const reader = new FileReader()<br>                reader.onload = (e) =&gt; {<br>                    setData((prev) =&gt; ({ ...prev, image: e.target?.result as string }))<br>                }<br>                reader.readAsDataURL(file)<br>            }<br>        }<br>    }</pre><p>1st render: 0.9ms</p><p>2nd render: 0.3ms</p><p>3rd render: 0.8ms</p><p>4th render: 0.3ms</p><p>5th render: 0.4ms</p><p>As expected, firs render took a little less time than the cached one as React has not to memoize a function, but likewise the cached one, the first render took more .ms than further renders as React, JavaScript and my very browser improves performance on the following renders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ki6CUEQPGG6jJPA0vHP13Q.png" /></figure><p>As we already know every performance optimization comes with a cost, and we can see in the very first render of our awesome application that React takes 0.3ms more to render this component than without an optimization technique. Further re-renders are already optimized by React itself, JavaScript engines and in the first case with the memoization technique.</p><p>I invite you to take this paper and send a PR to our “amigos” from Vercel and remove all the unnecessary memoization code in their examples.</p><h4>Finally and again, when should I optimize my React code?</h4><p>At this point, does it worth to optimize this component to avoid 0.3ms in some re-renders that nobody on earth can appreciate it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/0*zHPmu32w_UNm3S58.gif" /></figure><p>Let’s be honest guys, memoization techniques have a hidden cost which is downgrading developing experience. Hooks like useCallback and useMemo make the code more complex for your co-workers (even yourself in the future), difficult PR reviews, larger project codebase, and even you could make a mistake in the dependencies array, and like the case we have analyzed before you&#39;re potentially making performance worse by wrongly invoking the built-in hooks and preventing memoized functions from being garbage collected.</p><h4>When should I use memoization techniques?</h4><p>First approach: in really expensive computations that takes at least 100ms, always renders the same content, renders often, and specially when affects user experience with render lagging. If does not meet such requirements, do not bother to implement any optimization or your code will look like the cover of this article.</p><p>Second approach: NEVER. In React Conf 2021 the React Team announced that memoization techniques should be moved from your code base to the React Compiler. Check this video for further details:</p><p><a href="https://www.youtube.com/watch?v=lGEMwh32soc">https://www.youtube.com/watch?v=lGEMwh32soc</a></p><p>Finally, Andrew Clark (developer on the <strong>React</strong> core team at Facebook) posted the following:</p><iframe src="https://cdn.embedly.com/widgets/media.html?type=text%2Fhtml&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;schema=twitter&amp;url=https%3A//twitter.com/acdlite/status/1758229889595977824%3Fs%3D20&amp;image=" width="500" height="281" frameborder="0" scrolling="no"><a href="https://medium.com/media/5017562f5433124b2fbe18b88c4fc43f/href">https://medium.com/media/5017562f5433124b2fbe18b88c4fc43f/href</a></iframe><p>All React memoization built-in hooks will be moved from the React API base to the compiler by the end of 2024, so developers will not be worried never again to deal with optimization rather than focus on building outstanding user interfaces.</p><p>So yes, we have just spent some time reading an article about optimization techniques that will not be used by the end of this year.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*Y9nJ8rdnnS6QfRmo.gif" /></figure><p>Thanks for reading and if you have found interesting this article smash the clap button ✌️.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e7e854b487c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Types vs. Interfaces]]></title>
            <link>https://imgeorgemor.medium.com/the-answer-to-the-mother-of-typescript-debates-types-vs-interfaces-d503057738ea?source=rss-8e5c86e3689c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d503057738ea</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[typescript-tips]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Jorge Mor]]></dc:creator>
            <pubDate>Sun, 03 Dec 2023 23:54:49 GMT</pubDate>
            <atom:updated>2024-05-26T11:52:46.394Z</atom:updated>
            <content:encoded><![CDATA[<h3>types vs interfaces</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*gDskE3_ParocUmtKOBUksg.jpeg" /></figure><p><em>Disclaimer: All the cover images of my posts are a true work of art.</em></p><p>So at this point you already have your own mental model on how to use Types vs Interfaces in Typescript, here is mine (that could not be the same as yours obviously):<br>- Interface vs Type ? Choose Type<br>- ‘extends’ vs ‘&amp;’ ? Choose ‘extends’</p><p>Or in other words, use types until you need a feature of interfaces.</p><p>Now that I have spoiled the end of the article, lets dig in the technical details that support this mental model.</p><h4>Merging incompatibilities</h4><p>Interfaces create a single flat object type that detects property conflicts, which are important to resolve! Intersections on the other hand just recursively merge properties, and in some cases produce never.</p><p>In other words, extends disallows incompatible properties and ‘&amp;’ just resolves them to ‘never’. Couldn’t say more with less.</p><p>Let’s see with an example, we have two types, Hero and type Enemies and we want to create a new type called Spiderman based on those two types:</p><pre>type Hero = {<br>  name: string,<br>  enemies: number<br>}<br><br>type Enemies = {<br>  city: string<br>  enemies: &#39;Dr. Octopus&#39; | &#39;Green Goblin&#39; | &#39;Electro&#39;<br>}</pre><p>If we use a type intersection to create a new type called Spiderman Typescript will resolve to never as it cannot resolve the property enemies because they are incompatible:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QDROig9xQJpSHFfKOg5tVQ.png" /></figure><p>On the other hand, if we use an interface to extend over those two types, Typescript not only will throw and error but will tell us which property has an error (here in this example is easy to see but picture yourself modeling data types or interfaces with endless attributes).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CexPfPvqjnSdrZx8asiaaw.png" /></figure><p>If you want to play around with types and interfaces check this code in the Typescript playground:</p><p><a href="https://www.typescriptlang.org/play?#code/C4TwDgpgBAEhBOB7KBeKBvAUFKA7AhgLYQBcUAzsPAJa4DmANNlBLhIdROWbgK6EAjBJgC+mTKEhQAomw5dUGZgGNqoMpRr1mrdp25QA5ABF4AOigB5ZcERhe5Q1AA+RgOLwIrKG8QCANrROrobS-hA2SIai4gD0sVCS0ADKYNQAJgiE+LiKcEhQAGQycvrimLTACABm+MopaZnw2bkQAB5VuOnksAiIDCV6CugiQA">TS Playground - An online editor for exploring TypeScript and JavaScript</a></p><h4>Performance</h4><p>As I exposed in the above section (Merging Incompatibilities), intersections recursively merge properties, meanwhile interfaces create a single flat object type. As this post is not about performance I am not going to calculate how a recursively function is slower than creating a single flat object type, which to me seems obvious.</p><p>In terms of memory, type relationships between interfaces are also cached, as opposed to intersection types.</p><h4>Es-lint outdated</h4><p>When using the Eslint package eslint-config-standard-with-typescript (please note that at the time of writing this article this package wasnt legacy), also installed by default in front-end Typescript frameworks like Next.JS, throws the following error when using types over interfaces:</p><p>“Use an `interface` instead of a `type`.eslint<a href="https://typescript-eslint.io/rules/consistent-type-definitions">@typescript-eslint/consistent-type-definitions</a>”</p><p>My personal recommendation is to disable this rule in the .eslintrc.json file and probably send some anger tweets to the Eslint team:</p><pre>&quot;rules&quot;: {<br>        &quot;@typescript-eslint/consistent-type-definitions&quot;:&quot;off&quot;<br>    }</pre><h4>Readability</h4><p>This is more like a personal idiosyncrasy as I started my developer journey with strong typed languages where already use the ‘extends’ word to extend an interface over other. Despite of this, semanitcaly speaking is more easy to read ‘extends’ vs ‘&amp;’.</p><h4>Final thoughts</h4><p>As a rule of thumb I prefer Types vs Interfaces as Types are more convenient: <br>- can put type in itself <br>- can be array, object or non-object derived</p><p>However when I need features of an Interface like ‘extends’ or define a class implementation I prefer using the latest. In the end, the language is called Typescript, not Interfacescript (LOL).</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2F11qAyKz9AbFEYM%2Ftwitter%2Fiframe&amp;display_name=Giphy&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2F11qAyKz9AbFEYM%2Fgiphy-downsized.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2F11qAyKz9AbFEYM%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="244" frameborder="0" scrolling="no"><a href="https://medium.com/media/aae4c208c3db496afd1c37e8ec2b9d08/href">https://medium.com/media/aae4c208c3db496afd1c37e8ec2b9d08/href</a></iframe><p>Thanks for reading 🕸️!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d503057738ea" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You don’t know how to write types in typescript]]></title>
            <link>https://imgeorgemor.medium.com/you-dont-know-how-to-write-types-in-typescript-d8cfaf4857e5?source=rss-8e5c86e3689c------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8cfaf4857e5</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[wev-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Jorge Mor]]></dc:creator>
            <pubDate>Wed, 26 Jul 2023 15:52:34 GMT</pubDate>
            <atom:updated>2024-05-29T09:30:26.800Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*5RhyUqWmrXugwrjchoA5rA.jpeg" /></figure><p>Or probably you know, since you already clicked on the article lets take a look to my favorite best practices and clean code techniques on writing types (or interfaces) in Typescript. It is kind of a clean code Typescript recommendations (but shorter!).</p><p>As usual, let’s start tough!</p><h3>Never, never pluralize, unless you are typing an array</h3><p>As a rule of thumb, types should be singular unless they refer to an array. Let’s see it with an easy example:</p><pre>//don&#39;t do this<br>type BatmanEnemies = &#39;Joker&#39; | &#39;Bane&#39; | &#39;Scarecrow&#39;<br><br>//do this<br>type BatmanEnemy = &#39;Joker&#39; | &#39;Bane&#39; | &#39;Scarecrow&#39;</pre><p>Now if we want to implement a function where we pass by props an only one enemy having the type in singular makes more sense than in plural:</p><pre>//don&#39;t do this<br>const defeatEnemy = (enemy: BatmanEnemies) =&gt; {<br>  return `Batman saved Gothan from ${enemy}`<br>}</pre><p>As we can see in this code there is a miss-match from the prop passed and its type, so that’s why you should type in singular:</p><pre>//do this<br>const defeatEnemy = (enemy: BatmanEnemy) =&gt; {<br>  return `Batman saved Gothan from ${enemy}`<br>}</pre><h3>Do not use IWhateverYouThink or WhatEverType</h3><p>This probably comes from C# developers. In C# prefixing interfaces with an “I” actually makes sense because you want to differentiate classes and interfaces. Old school TypeScript developers have been implementing practices from other languages, but now that TypeScript has been using for a while and has a huge usage, turns out that other languages features may be outdated and do not fit in the nature of Typescript usage.</p><p>In Typescript though, the differences between types and interfaces are so subtle that having a prefix or suffix may condition you and your team to use always an interface.</p><pre>//don&#39;t do this<br>interface IBatman {<br>  realName: string,<br>  age: number,<br>  city: string,<br>}<br><br>//do this<br>interface BatmanModel { //or just Batman<br>  realName: string,<br>  age: number,<br>  city: string,<br>}</pre><h3>Casing Is Key</h3><p>Casing types is a good way to differentiate from variables. Although Typescript understands what variables are in the run level and types are in the type level, so they do not conflict, it makes hard to read and the syntax just gets confusing 🤷.</p><pre>//don&#39;t do this<br>type batmanVehicle = &#39;tumbler&#39; | &#39;the bat&#39; | &#39;batpod&#39;<br><br>const chaseEnemies = (batmanVehicle: batmanVehicle) =&gt; {}<br><br>//do this<br>type BatmanVehicle = &#39;tumbler&#39; | &#39;the bat&#39; | &#39;batpod&#39;<br><br>const chaseEnemies = (batmanVehicle: BatmanVehicle) =&gt; {}</pre><p>The difference is subtle but powerful.</p><h3>Generics &lt;T&gt; look cool but you should avoid mental references</h3><p>There is nothing that make me feel like a real pro Typescript developer than using generics, specially &lt;T, U, V&gt; and so on. In short, generics are like passing type variables to a type. We all have seen this kind of code:</p><pre>//don&#39;t do this<br>type BatmanFilm&lt;T&gt; = {<br>  actor: T<br>  director: Director<br>}</pre><p>In this example the &lt;T&gt; stands for an actor type, however by using T is like naming your function parameters with just letters a, b, c… This type of naming conventions are difficult to read and maintain, they refer to a mental model you won’t remember always (not to mention your team members), so I prefer to give a semantic name to the generic prefixing with a T to indicate it is a generic:</p><pre>//do this<br>type BatmanFilm&lt;TActor&gt; = {<br>  actor: TActor<br>  director: Director<br>}</pre><h3>You are not using as const constantly enough</h3><p>You probably have seen this code before</p><pre>const batmanVehicles = {<br>  car: &#39;tumbler&#39;,<br>  motorbike: &#39;pod&#39;,<br>  hybrid: &#39;bat&#39;<br>} as const;</pre><p>The difference with using as const or not, among others, is that objects with as const infers not the type of the value (i.e. car would be a string) but the literal value (then car would be ‘tumbler’).</p><p>Then it is easy to extract the value into a type by using the “typeof” syntax (just like enums works if you are wondering). I recommend my previous article section about enums where I strongly advise to stop using them and start using objects with as const syntax:</p><p><a href="https://medium.com/@imgeorgemor/from-pro-to-hero-in-typescript-4d7bc73563c0">https://medium.com/@imgeorgemor/from-pro-to-hero-in-typescript-4d7bc73563c0</a></p><pre>type BatmanCar = typeof batmanVehicles.car</pre><p>In this case type BatmanCar stands for ‘tumbler’ instead of a string. This is specially useful when you want to use the value of the object instead of the current type.</p><p>🙏 Thanks for reading and please support this content by commenting, sharing on Twitter, LinkedIn, wherever, smashing the clap button or just sharing with your friends and foes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8cfaf4857e5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Typescript hero-features]]></title>
            <link>https://imgeorgemor.medium.com/from-pro-to-hero-in-typescript-4d7bc73563c0?source=rss-8e5c86e3689c------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d7bc73563c0</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Jorge Mor]]></dc:creator>
            <pubDate>Thu, 13 Apr 2023 21:05:41 GMT</pubDate>
            <atom:updated>2024-05-29T09:21:40.505Z</atom:updated>
            <content:encoded><![CDATA[<h3>Typescript super-features</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*65TKLUlq6Gy4Efq7Gf5ZqA.png" /></figure><h3>INTRODUCTION</h3><p>If you are familiar with Typescript you probably have heard it is a programming language that’s a superset of JavaScript. It is like Javascript is Bruce Wayne and with Typescript becomes Batman. In technical words, TypeScript allows developers to write code that is more robust, maintainable, and scalable just by adding types. To learn more about the advantages of typescript check my previous article in this regard:</p><p><a href="https://medium.com/@imjorgegemor/typescript-is-the-red-pill-though-its-logo-is-blue-86f0dd7a1246">https://medium.com/@imjorgegemor/typescript-is-the-red-pill-though-its-logo-is-blue-86f0dd7a1246</a></p><p>The following recommendations are kind of a mental note of my favorite Typescript best practices or pro-tips that I frequently use, and from time to time I just think “how that feature was implemented?”, and then search documentation or references, and then write some spike and then implement it. With this article and its examples I have a good reference of them and save me and hope you tons of time searching for examples.</p><p>Hope this pro-tips help you like me and yeah, lets become the Typescript Batman.</p><h3>UTILITY TYPES</h3><p>Typescript has a builtin pre-defined utility types to facilitate common type transformations, mutations or adaptations. Utility types are like Batman Utility Belt (that was easy to reference). A common mistake and non-scalable practice is sometimes we tend to duplicate types because we need different subsets of them. These are my favorites:</p><h4>OMIT TYPE</h4><p>Lets say we have this interface:</p><pre>interface BatmanFilms {<br>  title: string;<br>  description: string;<br>  viewed: boolean;<br>  createdAt: number;<br>}</pre><p>And now we are developing a function that needs all the keys of the interface but “viewed” and “createdAt”. You may be tempted to create a new interface like that:</p><pre>interface BatmanFilms2 {<br>  title: string;<br>  description: string;<br>}</pre><p>Don’t do this. Instead of duplicating the interface (which is agains all the SOLID principles and is not scalable at all because any change on the BatmanFilms will not be reflected in the BatmanFilms2) you can create a type linked to the main interface:</p><pre>type BatmanFilms2 = Omit&lt;BatmanFilms, &#39;viewed&#39; | &#39;createdAt&#39;&gt;;</pre><p>By doing so you not only are mastering Typescript but creating sub-types from interfaces, avoids you to refactor sub-types in case the main interface types got changed.</p><h4>PICK TYPE</h4><p>Same as before, but instead of omitting the keys we don’t need, we create a type including the ones we need or “pick”:</p><pre>type BatmanFilms2 = Pick&lt;BatmanFilms, &#39;title&#39; | &#39;completed&#39;&gt;;</pre><h4>PARTIAL TYPE</h4><p>You can construct a new type with all properties of the referred type or interface set to optional.</p><p>So instead of declaring a new interface setting all the properties to optional, you may just create a type linked to the main interface:</p><pre>type BatmanFilmsOptional = Partial&lt;BatmanFilms&gt;;</pre><p>And yes indeed you can bring it to the next level mixing partials with pick or omit utility types like this:</p><pre>type BatmanFilmsOptional2 = Partial&lt;Omit&lt;BatmanFilms, &#39;title&#39;&gt;&gt;;</pre><h3>CREATING TYPES FROM TYPES (FORMER ADVANCED TYPES)</h3><p>TypeScript’s type system is as powerful as, let’s say Batman, because it allows expressing types <em>in terms of other types</em>. Advanced types go from generics (I will work in a new article if you like this one) to conditional types.</p><p>Lets start with Indexed access Types:</p><h4>INDEXED ACCESS TYPES</h4><p>Creating a type from other types is a sub-variant of the utility types mentioned before. Typescript utility types get tricky when you need a type from a nested object. Lets say we have the following interface:</p><pre>interface BatmanCollaborator {<br>    name: string;<br>    age: number;<br>    lang: string;<br>    address: {<br>        postalCode: number;<br>        city: string;<br>        street: string;<br>    }<br>}</pre><p>The utility type Pick is useful when we need top level properties, but when we need a sub-level of them, if we use Pick the result will not be as expected. Lets create a type of the address, and so far we would use Pick, so typescript does the following:</p><pre>type AddressType = Pick&lt;BatmanCollaborator, &#39;address&#39;&gt;;<br>const address: AddressType = {<br>    address: {<br>        city: &#39;Gotham-city&#39;,<br>        postalCode: 212,<br>        street: &#39;Crime Alley&#39;,<br>    },<br>};</pre><p>Sure, I had the same thought the first time I used Pick to get a subset type. This is not what I expected. In this case, instead of using Pick we should access the interface or type key as we would do with objects (or as the Typescript docs say Indexed access types”):</p><pre>type AddressType = BatmanCollaborator[&#39;address&#39;];</pre><p>Now the result is as we expected:</p><pre>const address: AddressType = {<br>  city: &#39;Gotham-city&#39;,<br>  postalCode: 212,<br>  street: &#39;Crime Alley&#39;,<br>};</pre><h3>SHARPENING OUR TYPESCRIPT SKILLS</h3><p>If you have arrived at this point you are already a hero in Typescript, but this is only the surface. Typescript has an exhaustive set of capabilities based on its everyday types, is like a programming language for types. Lets dig in into my favorite one.</p><h4>TYPE PREDICATES</h4><p>Type predicates have a lot to do with Union types, lists of different types o just data that is unknown. You will understand with the following example, and how not, with Batman involved.</p><p>We all have been in this situation. Lets say we have function that for any reason the type of the parameter received is unknown or at least we do not know it exactly, or could be a type from a union type, could be any, or could be whatever (you feel me right!), probably because comes from a third party interaction (like an API, database, etc…). Although, we do actually know what would we do if certain type is meet. In the following example we have two interfaces: ‘BatmanFriends:</p><pre>interface BatmanFriends {<br>    name: string;<br>    isFriend: boolean;<br>    costume: string;<br>}<br><br>interface BatmanEnemies {<br>    name: string;<br>    isEnemy: boolean;<br>}<br><br>type BatmanCharacters = BatmanFriends | BatmanEnemies //=&gt; this is a union type</pre><p>And then you have this function:</p><pre>function attackTogetherWrong(character: BatmanCharacters) {<br>    console.log(&#39;ATTACK TOGETHER!!! BIFF💥! POW💥!! BAM💥!&#39;);<br>}</pre><p>But you only want to execute this function when a BatmanFriends character is received as parameter. Then you start messing around with the code with non scalable solutions like using any or endless ifs, and then Typescript intelliSense stops working because of the “any” and the code becomes a mess, and then you that Typescript isn’t as great as you thought.</p><p>I feel you, been there, and Typescript keeps being great. There are many ways to fix it but one of my preferred is a type predicate. It is a type assertion that checks if an object has a specific property or set of properties and then assign the type/ interface you want to this object. See below with an example:</p><pre>function isBatmanFriend(character: BatmanCharacters): character is BatmanFriends {<br>    return (character as BatmanFriends).isFriend ? true : false;<br>}</pre><p>What we have done above is create a function that returns a type with “character is BatmanFriends” (I had the same thought, this is behind great, a function returning a type). In this case I choose the property isFriend from the interface BatmanFriends and if this property is just met, irrespective of its value, return such type.</p><p>Now we go back to our function and implement the type narrow we made before:</p><pre>function attackTogether(character: BatmanCharacters) {<br>    if (isBatmanFriend(character)) {<br>        console.log(character.costume, &quot;ATTACK TOGETHER!!! BIFF💥! POW💥!! BAM💥! &quot;);<br>    }<br>}</pre><p>The greatness is that we would not loose the intelliSense, if we try to access the character properties, Typescript will suggest the ones from BatmanFriends (see below):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GHGZsNWABYHKlFRy4hgdPQ.png" /></figure><p>🙏 Thanks for reading and please support this content by commenting, sharing on Twitter, Linkedin, wherever or smashing the clap button. Promise to keep writing about web development and I’ll improve my Photoshop skills 😅</p><h4>REFERENCES</h4><p><a href="https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates">Documentation - Narrowing</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FjjMbPt_H3RQ%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DjjMbPt_H3RQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FjjMbPt_H3RQ%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2cd4220cfe3c6b4382f880d03c665112/href">https://medium.com/media/2cd4220cfe3c6b4382f880d03c665112/href</a></iframe><p><a href="https://joyofcode.xyz/typescript-fundamentals#type-predicates">TypeScript Fundamentals</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d7bc73563c0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Typescript is the red pill (though its logo is blue)]]></title>
            <link>https://imgeorgemor.medium.com/typescript-is-the-red-pill-though-its-logo-is-blue-86f0dd7a1246?source=rss-8e5c86e3689c------2</link>
            <guid isPermaLink="false">https://medium.com/p/86f0dd7a1246</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[typescript-with-react]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[job-search]]></category>
            <category><![CDATA[job-interview-tips]]></category>
            <dc:creator><![CDATA[Jorge Mor]]></dc:creator>
            <pubDate>Mon, 06 Feb 2023 15:40:50 GMT</pubDate>
            <atom:updated>2023-02-06T15:40:50.561Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*fIaNxbPceFAQRSAwQBA83w.jpeg" /></figure><blockquote>You take the blue pill — the story ends, you wake up in your bed and believe whatever you want to believe. You take the red pill — you stay in Wonderland and I show you how deep the rabbit hole goes.</blockquote><p>Welcome to Wonderland of developing experience that Typescript offers.</p><p><em>Disclaimer: This article is rather a personal opinion of Typescript on my path of learning software development, particularly focused on frontend. I asume that you already know what Typescript is, but this a non technical article.</em></p><h3><strong>First thoughts</strong></h3><p>I started learning software fundamentals with Java and then quickly moved to web development with Javascript. At the beginning with my Javascript journey I was amazed about the developing experience with a language non statically typed, I felt that typed languages like Java where a boomer thing while Javascript was like the surf-skate and graffiti culture of Los Angeles. What I’ma say, I’m a kid of the 90’s.</p><p>During my first job in a big corporation they had the policy of choosing Microsoft software languages and solutions. If Microsoft would have any product that could be applied in software development, should be implemented. So for the backend we were using C#, Typescript in the frontend, Azure DevOps and so on ;) Big fans of Microsoft!</p><p>At the very beginning I was skeptical of using a typed language, I thought could be against the developing experience and make developing slow, type-checking took time, etc… Couldn’t be more wrong. After more than 1 year working with Typescript I am delighted to have learned and using it in either bigCo and go-home projects.</p><h3><strong>Typescript is Wonderland</strong></h3><h4>When looking at a company you want to apply</h4><p>If you have ever been in a situation of changing from one job to another, or you get a new offer or want to apply for a new position, asking whether they use Typescript could be a standard of culture development and good practices. Not using Typescript in a big project shall be considered a red flag.</p><p>Typescript warrantees a minimum documentation of the project and avoid errors on development that lastly could be transferred to production. It also makes sense when the project have a lot of objects with direct reference to the domain or the business, specially when such objects are shared with the backend (speaking from a frontend side). In such case Typescript helps to document and set a contract of the business domain for the whole developing team. Despite of backend and frontend may probably use different typed developing languages, Typescript would help to the UI communicate efficiently with the database.</p><p>Finally, companies using Typescript probably would have sooner or later implement some kind of domain driven based architecture, or at least the grounds have been settled for any Domain Driven Design. Sounds like Wonderland to me.</p><h4>When analyzing your developing skills</h4><p>This could seem pretty obvious, although having a deep knowledge in Typescript, specially for junior developers looking for a first job in a medium-size or big project, is one more developing language in their resumé that recruiters high value. At the time being, the majority of companies developing long-lasting software products are using Typescript, so I highly recommend to align your software skills with the market requirements.</p><p>In addition, Typescript will make your code more readable, assist with abstractions, and among other benefits, understand better the business domain you are working on.</p><p>Check this article how typescript can help you to be a better developer: <a href="https://medium.com/@lmuntaner/why-typescript-8286016c3707">https://medium.com/@lmuntaner/why-typescript-8286016c3707</a></p><p>I totally recommend to get the Microsoft Typescript Certification (I already have mine) so you may show to recruiters that excels in Typescript -It only takes an afternoon to complete it and the knowledge is forever-:</p><p><a href="https://learn.microsoft.com/en-us/training/paths/build-javascript-applications-typescript/">Build JavaScript applications by using TypeScript - Training</a></p><h3><strong>Conclusion</strong></h3><p>Typescript is a hand-holding in developing software, specially is the perfect usher during methods and domain implementation thanks to IntelliSense (intelligent code completion) and creates a homogeneous developing experience within the whole team setting the basis of the Wonderland Domain Driven Design architecture.</p><p>UPDATE: If you want to sharpen your Typescript knowledge I have recently discovered this course from Joe Previte and I couldn’t be more excited to do it <a href="https://www.typescriptcourse.com/">https://www.typescriptcourse.com/</a></p><h3>References</h3><p><a href="https://medium.com/@lmuntaner/why-typescript-8286016c3707">https://medium.com/@lmuntaner/why-typescript-8286016c3707</a></p><p><a href="https://learn.microsoft.com/en-us/training/paths/build-javascript-applications-typescript/">https://learn.microsoft.com/en-us/training/paths/build-javascript-applications-typescript/</a></p><p><a href="https://www.typescriptcourse.com/">TypeScript Course</a></p><p>🙏 Thanks for reading and please support this content by commenting, sharing on Twitter, Linkedin, wherever or smashing the clap button.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86f0dd7a1246" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[If you know what fast refresh is, this is for you, otherwise keep scrolling]]></title>
            <link>https://imgeorgemor.medium.com/if-you-know-what-fast-refresh-is-this-is-for-you-otherwise-keep-scrolling-b5dba86d2f48?source=rss-8e5c86e3689c------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5dba86d2f48</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[webpack]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Jorge Mor]]></dc:creator>
            <pubDate>Mon, 16 Jan 2023 11:30:18 GMT</pubDate>
            <atom:updated>2023-02-14T23:05:19.797Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UX4VQalOGhKgWLpfDuKvOw.png" /></figure><h3>INTRODUCTION</h3><p>For those who do not know what is fast refresh (and not, its not the gaterodade shower 🫠) or its former version hot-reload are in development environments, let put you in some context. Let’s say you are working in some website development project, in particular using React (probably set up with Create React App, NextJS, Remix, Vite, you know what I mean), and every time you make some changes in any javascript or css file you are able to see those changes without refreshing the navigator nor loosing the state of the app automatically, without manually refreshing the app.</p><p>Welcome to this amazing developer experience.</p><h4>BACKGROUND</h4><p>The other day I was just scrolling down <a href="https://www.youtube.com/@KentCDodds-vids/videos">Kent C Dodds YouTube Channel</a> and I found this interview with Dan Abramov about several React issues, in particular hot-reload from 7 years ago:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FqXVakfdA040%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqXVakfdA040&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FqXVakfdA040%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d97c62fefbcda6d3bf4dc980fdf4957/href">https://medium.com/media/9d97c62fefbcda6d3bf4dc980fdf4957/href</a></iframe><p>In short (the video lasts almost an hour), in minute 8:30 Kent asks about React Hot Loader, which by that time was one of the first projects of Dan Abramov and he defined as:</p><blockquote>the idea of hot module replacement is that you edit some code, you press save and instead of reloading your whole application is going to replace just specific JavaScript Modules</blockquote><p>In response to that Kent reasonably points out the huge frustration produces refresh cycle and specially when you are working on has a lot of state involved, routes or as he says “click here, go here and fill out this form and then click this thing”.</p><p>In this regard Kent explains how in only 20 minutes implemented hot loader in a experimental react project setup with Webpack hot module API and “how super amazing it was”.</p><h4>NEW ERA. FAST REFRESH</h4><p>During summer 2020, Dan Abramov twitted:</p><h3>дэн on Twitter: &quot;If you use react-hot-loader, now is a good time to remove it and try Fast Refresh (and its webpack plugin by @pmmmwh). RHL is extremely brittle, relies on many hacks, and has caused countless issues. It served its purpose and its time is due. https://t.co/oWK3N8wisy / Twitter&quot;</h3><p>If you use react-hot-loader, now is a good time to remove it and try Fast Refresh (and its webpack plugin by @pmmmwh). RHL is extremely brittle, relies on many hacks, and has caused countless issues. It served its purpose and its time is due. https://t.co/oWK3N8wisy</p><p>Fast refresh is the last iteration of react hot loader. It was implemented in the <a href="https://github.com/facebook/create-react-app/releases/tag/v4.0.0">v.4.0.0 of CRA</a> (Create React App command line) and following versions, in NextJS, Remix, and even React Native has its mobile development of fast refresh.</p><p>In general terms fast refresh does the same as the hot loader module but it is faster and more reliable specially in applications with complex local and global states and in particularly supports css-in-js, which I found really amazing.</p><h4>IMPLEMENTATION WITH WEBPACK</h4><h4><em>Disclaimer:</em></h4><p><em>As the Fast Refresh Readme exposes this package still is EXPERIMENTAL and may not handle unknown edge cases. Despite of this I have yet not had any issue at the time of writing this article and it does not affect to production environments.</em></p><ul><li>If you are setting up a project with CRA, NextJs, Remix, comes by default in latest versions.</li><li>React Native projects for mobile app development also includes fast-refresh.</li><li>If you rather prefer configure your react project from scratch I prepared a boilerplate template with Webpack 5 in this GitHub repository <a href="https://github.com/imjorgemor/fast-refresh-template">https://github.com/imjorgemor/fast-refresh-template</a> following the recommendations of the <a href="https://github.com/pmmmwh/react-refresh-webpack-plugin">Official Fast-Refresh documentation </a>and my favourite Webpack presets and linters both for a javascript and typescript project.</li><li>UPDATE: If you are looking for a more comprehensive configuration with sass, routers, postcss, tailwind, I totally recommend this article: <a href="https://medium.com/@brandonwie/the-complete-guide-for-setting-up-custom-react-ts-application-c33c36f92666">https://medium.com/@brandonwie/the-complete-guide-for-setting-up-custom-react-ts-application-c33c36f92666</a></li></ul><h4>PERSONAL OPINION</h4><p>As I am pro of developer experience first, fast refresh or formerly hot reload is the new standard of development. Any frontend technology that does not support it is time consuming and usually frustrates the developer behind the projects (been there). Within my recent experience, implementing fast-refresh with access to the backend API calls, without mutating local state and global states it reduced significantly the time in developing new or maintain product features which in turn ends with a happy Product Owner.</p><p>Oh boy, as I always say, there is nothing better than a good developing experience with a happy PO.</p><p>🙏 Thanks for reading and please support this content by commenting, sharing or smashing the clap button.</p><h4>REFERENCES</h4><ul><li><a href="https://github.com/pmmmwh/react-refresh-webpack-plugin">GitHub - pmmmwh/react-refresh-webpack-plugin: A Webpack plugin to enable &quot;Fast Refresh&quot; (also previously known as Hot Reloading) for React components.</a></li><li><a href="https://www.youtube.com/@KentCDodds-vids/videos">Kent C. Dodds</a></li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FFMNuTj89RzU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DFMNuTj89RzU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FFMNuTj89RzU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/f14a1f56a041d6562d1719120ae0eab3/href">https://medium.com/media/f14a1f56a041d6562d1719120ae0eab3/href</a></iframe><p><a href="https://medium.com/@brandonwie/the-complete-guide-for-setting-up-custom-react-ts-application-c33c36f92666">https://medium.com/@brandonwie/the-complete-guide-for-setting-up-custom-react-ts-application-c33c36f92666</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5dba86d2f48" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>