<?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 Thierry S on Medium]]></title>
        <description><![CDATA[Stories by Thierry S on Medium]]></description>
        <link>https://medium.com/@thierryskoda?source=rss-a88d60b00623------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7H7LIs-N45NF6kpWMgpGMg.png</url>
            <title>Stories by Thierry S on Medium</title>
            <link>https://medium.com/@thierryskoda?source=rss-a88d60b00623------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 16:45:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thierryskoda/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[Speed up using reusable components]]></title>
            <link>https://medium.com/@thierryskoda/speed-up-using-reusable-components-699942d94781?source=rss-a88d60b00623------2</link>
            <guid isPermaLink="false">https://medium.com/p/699942d94781</guid>
            <category><![CDATA[patterns]]></category>
            <category><![CDATA[components]]></category>
            <category><![CDATA[experience]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[reusable]]></category>
            <dc:creator><![CDATA[Thierry S]]></dc:creator>
            <pubDate>Wed, 13 May 2020 03:02:27 GMT</pubDate>
            <atom:updated>2020-05-13T03:02:27.344Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rrfsH2Ro7kn_-4KD" /><figcaption>Photo by <a href="https://unsplash.com/@christianem?utm_source=medium&amp;utm_medium=referral">Christian Englmeier</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>One of my favorite thing about being a developer is being able to ship new products really fast. Since there’s a limit of character I can type per second on my keyboard, my main focus recently has been to find new ways to ship faster. Even if I discovered reusable components a few years ago, I never used them the way I do today. And trust me, it increased my speed by a lot.</p><p>I’m writing my first blog post ever and plan to make a lot more. In this current series, I plan to talk about all the patterns, tools and technologies I’m using to ship new products faster than ever before. I will also talk about the things I’ve learned, the mistakes I’ve made and the things I will probably never do again.</p><h3>The less fun</h3><p>Before diving into all the beauties of using reusable components, I just wanted to make a few statements on how it can be painful sometimes and why you gotta be careful when you’re building “reusable components”.</p><p>When they are not built right, they will slow you down later on and you will probably take a lot of time debugging your app to then find that the problem is hidden in the component you’ve built a few months ago.</p><p>Not only that, but it will probably be 10pm on a Friday night when you will find out what caused your app to crash in production. You’ll fix the problem really fast without thinking too much about the impact that this change will have on your other pages (because you’re probably using it at 23 more places in your app). The next morning, you’ll probably wake up and realize you’ve been causing 2 new bugs with the fix you did yesterday.</p><p>I know it’s not the same reality for everyone. I know that’s why testing exists, PR review, staging and all the rest. I’m only talking about my current situation here: A solo dev in a startup that needs to ship faster that he can think.</p><p>What I’m trying to say here is that there’s a lot of reusable component that we think they are reusable but in fact they are not. A quick example of that might be a component that has some margin around it. Most of the time, I think it just makes sense to use styling like that in the components, but I later realize that by doing that I’m limiting how I can use this component in other modules. I then end up passing more props to it so it can have the custom look I want but it would have been faster to just write a new component.</p><p>It’s also important to think of the readability of your components. If it takes you a few minutes to understand how your reusable component works every time you want to use it you clearly not saving anytime.</p><h3>The good stuff</h3><p>Here’s a form that I have in one of my app (Shoutout to <a href="https://medium.com/u/8f260f6ec82d">Dashlane</a> autocompletes here).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tru8QUInbE9VB3eLXO5dBA.png" /></figure><p>Here’s the line I needed to write to create this beautiful form:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ed8102d9004d65b9dea6afc961507d1a/href">https://medium.com/media/ed8102d9004d65b9dea6afc961507d1a/href</a></iframe><p>Yes, there’s also the <strong>FIELDS </strong>variable… But it just so much easier to create my forms that way. I simply need to create an array of <em>fields </em>object and let the Form component do the magic.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/439e957e3ba131e4a7ae6ffb7e13f03e/href">https://medium.com/media/439e957e3ba131e4a7ae6ffb7e13f03e/href</a></iframe><p>Putting <strong>required: true </strong>to a field will make sure this field is not empty on submit, putting <strong>type: ‘dropdown’</strong> will make sure to render the right input, etc.</p><p>Having a project with a lot of forms (100% of my projects have a lot of forms), this can save me a lot of time. I can never worry about having my forms having different layout and can easily only edit one component to make a change in a lot of place in my app.</p><p>Creating those kinds of components lets me ship new features so much faster. Whenever I start a new feature, most of the time, my brain already knows what the feature will look like and how it will work. To increase my speed when shipping new features, I need to make sure that I can write code as fast as I possibly can. That’s why I love reusable components.</p><h3>Other patterns I’m using</h3><p>One thing I’m doing to avoid creating too many reusable components that won’t be reused anywhere else is creating the component in the file it’s being used in. So let’s say I’m building this custom dashboard page and I need a card component in it. I will just create the card component directly in the same file and whenever I see that I need the same code anywhere else, I will just extract the code and create my reusable component. Also, most of the time, I will need to change the props names so they can be more generic.</p><p>Another thing I’m doing is that I’m using the overrides pattern by the Uber. With this pattern it’s really easy to build a component and still make sure we can pass a few props to make it custom to a certain context.</p><p><a href="https://medium.com/@dschnr/better-reusable-react-components-with-the-overrides-pattern-9eca2339f646">Better Reusable React Components with the Overrides Pattern</a></p><p>Lastly, I’ve become much better at giving clear names to my components. I used to create my component really fast and just give them names like <strong><em>&lt;CoolList/&gt;.</em></strong> Few weeks later, I’ve no idea if I should be using the <strong><em>&lt;CoolList/&gt;</em></strong> component or the <strong><em>&lt;DefaultList/&gt;.</em></strong></p><p>Thank you so much for reading! As I said before, this is my first blog post on the subject. Something I love and will always love is being challenged. If you have any feedback or have questions, please don’t hesitate to add a comment down below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=699942d94781" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>