<?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 Martin Černín on Medium]]></title>
        <description><![CDATA[Stories by Martin Černín on Medium]]></description>
        <link>https://medium.com/@martincernin?source=rss-304217175110------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*j0M22hEn1rjc173G</url>
            <title>Stories by Martin Černín on Medium</title>
            <link>https://medium.com/@martincernin?source=rss-304217175110------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 08:58:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@martincernin/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[“UIKit” — UI library with reusable FrontEnd components]]></title>
            <link>https://medium.com/tech-hunters/uikit-ui-library-with-reusable-frontend-components-35222c02cf22?source=rss-304217175110------2</link>
            <guid isPermaLink="false">https://medium.com/p/35222c02cf22</guid>
            <category><![CDATA[uikit]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Martin Černín]]></dc:creator>
            <pubDate>Fri, 25 Oct 2019 15:34:05 GMT</pubDate>
            <atom:updated>2019-10-25T15:34:05.846Z</atom:updated>
            <content:encoded><![CDATA[<h3>“UIKit” — UI library with reusable FrontEnd components</h3><h4><a href="https://www.roihunter.com/">ROI Hunter</a> is a Product Marketing Platform that helps create, automate and optimise online ad campaigns. The whole application is powered by ReactJS library in combination with TypeScript, where several teams work, all in charge of a specific part of the platform. Individual teams are more specialised within their part of the platform and it is always easier to solve some things with specific team members during the development. Three smaller projects have been created since the creation of the ROI Hunter application — Video editor Mia, Image editor TEDI and UI library UIKit. Now let’s talk more about UIKit.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B3onEj9C6IY7TEEZ" /><figcaption>Photo by <a href="https://unsplash.com/@marvelous?utm_source=medium&amp;utm_medium=referral">Marvin Meyer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Why we started the UIKit project</h3><p>A UIKit is a UI library in which we have all the UI elements we use in ROI Hunter. Like any other project, ROI Hunter began with a difficult decision on which technology to use, how to define the structure of the project, how to work with the stylisation of the whole project and so on. After a few weeks of work, the idea to unite all UI elements under a new project to bring together styles and components (buttons, inputs, icons, loaders, etc.) began to grow, and provide an easy way to share styles and components across multiple projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ccGzbIBwppyCRYQc" /><figcaption>Photo by <a href="https://unsplash.com/@helloquence?utm_source=medium&amp;utm_medium=referral">Helloquence</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Our experience with the UIKit project</h3><p>Gradually smaller FrontEnd projects were created in ROI Hunter that needed to be added to the main project, such as our Mia video editor, and we had to ensure that the component styles were consistent. If each project had its own components, any changes would be difficult to track and we would have to work it out in several different places, with the risk of forgetting to change some projects altogether.</p><p>UIKit makes changes easy, just edit a component in one place and then just update the version in your project. UIKit can also be versioned independently of the main project and it is possible to prepare new changes in advance and then only update the version together with the project in which the new changes are incorporated.</p><p>For new developers who are only a short time in the company, it may be quite difficult to remember all the components, the different component options, and when to use which component. For this purpose, we used <a href="https://react-styleguidist.js.org/"><strong>react-styleguidist</strong>,</a> thanks to which it is possible to add any number of usage examples as well as various corner cases to each component using examples in * .md files. Newcomers just need to open this guide and quickly get to know all the components and their capabilities.</p><p>However, it is important to put a lot of emphasis on testing, as UIKit could be used by multiple projects and changes in new versions will, of course, be reflected in all projects after the update. The big advantage is the ability to decrease <strong><em>(reverse?)</em></strong> the version at any time and quickly solve any problems that arise after the update.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*kspomPyo6RcUfaOw.gif" /><figcaption>Animation by <a href="https://dribbble.com/justinreyreyna">Justin Reyna</a></figcaption></figure><h3>How to start your own UIKit project</h3><p>For the basis of the whole project, I recommend choosing <a href="https://react-styleguidist.js.org/"><strong>react-styleguidist</strong></a>. With the help of a small config file, this offers the possibility to present examples of components, a local server for the development of the entire project and, for the compilation of the project, you just need to create a config for the <strong>webpack</strong>. For <a href="https://react-styleguidist.js.org/">react-styleguidist</a> in combination with <strong>TypeScript</strong>, I also definitely recommend the <a href="https://github.com/styleguidist/react-docgen-typescript/"><strong>react-docgen-typescript</strong></a><strong> </strong>package, which can parse types from TypeScript and it is not necessary to define the <strong>PropTypes </strong>for components. Components can be divided into different searchable sections. This gives us a quick and clear way to share components with other developers.</p><p><a href="https://react-styleguidist.js.org/"><strong>React-styleguidist</strong></a> also understands <strong>TypeScript</strong> very well, without this I would definitely not embark on similar projects. The stability and flawlessness of the whole project come down to many necessary key features, and thanks to the static typing that <strong>TypeScript</strong> brings to the project, the work on the project is much safer and at the same time, you can use the <strong>TypeScript</strong> types for automatic completion in the <strong>IDE</strong>.</p><p>Once the project itself is set up, compiled and ready to start using in other projects, we have several options to publish the project. A quick option is to publish the package directly to the public <strong>npm</strong> repository. You can also use other services, such as <a href="https://bit.dev/"><strong>bit.dev,</strong></a> or create your own <strong>npm</strong> repository on your server. If you use <strong>Github</strong>, it is also possible to use the new <a href="https://github.com/features/package-registry"><strong>Github</strong> packages</a>.</p><p>With the project itself comes another responsibility — keeping dependencies updated. I highly recommend <a href="https://dependabot.com/"><strong>DependaBot</strong></a>, which takes care of update checks and creates pull requests with individual updates. Last but not least, we want to make component modifications and package updates as comfortable as possible, so it is very important to ensure proper testing of the entire project. We have decided to use <strong>Jest </strong>and<strong> Enzyme</strong> with snapshots for unit tests and <a href="https://www.cypress.io/"><strong>Cypress</strong></a> to automatically click through all components. Of course, you can also make full use of <strong>TypeScript</strong> in both cases. Working on the project must then be a fairytale for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GGoyN2u1Rvt9uk0W" /><figcaption>Photo by <a href="https://unsplash.com/@joszczepanska?utm_source=medium&amp;utm_medium=referral">Jo Szczepanska</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What to watch out for</h3><h4>Workflow</h4><p>For a project of this scale, it is important to clearly define how to further develop the project, so that anyone who comes to the project can easily and quickly add new modifications and prepare everything for inclusion as soon as possible. If UIKit is used across multiple projects, there is a good chance that the developers from the respective teams will want to participate in the development.</p><h4>Dependencies</h4><p>I recommend limiting <strong>dependencies</strong> to the necessary libraries, reducing the time required to update packages, testing and checking everything. At the same time, it is ideal to store only those packages in dependencies that need to be installed for the project implementation, the rest is preferable to save in <strong>devDependencies</strong>. I also recommend using <strong>peerDependencies</strong>, which allows developers to see which packages are needed.</p><h4>Enums</h4><p>Certainly, there is no need to describe how the enum can make our lives easier. When we define the props for each component, most of us are looking for the enums that are also available through <strong>TypeScript</strong>. However, when we use these enums in local development, it is ideal to export the enums together with the components from the project so that they can be used directly in projects.</p><h4>Complexity</h4><p>Individual components should not be too complex, most logic should be implemented by the developer directly in the project. Over time, there may be a tendency to add larger and complex components, often composed of several UIKit components, but in this case, it is advisable to start thinking about integrating more complex components, such as exporting under a different name or creating a new project.</p><h4>Disadvantages</h4><p>Often developers may have mismatches about which component to include and whether it is appropriate to add a component to UIKit when implementing a task. In this way, different duplicates of components and possibly duplicates directly from UIKit can be created in projects with some custom modifications. In this case, UIKit will begin to lose momentum. Last but not least, adapting styles to projects can be a problem. It may happen that some projects will have specific requirements, and when developing components in UIKit, all of these requirements need to be evaluated and implemented to avoid the tendency to hack styles or components.</p><h3>Meet us at ReactiveConf 2019 in Prague!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*jZZk-EHtuyLE7sQCv8S8FA.gif" /></figure><p>Come and meet us <a href="http://reactiveconf.com/">there</a>! We’ll be the booth with the Beatsaber VR set (see below ⬇). Our CTO will give a talk about React web apps performance.</p><p>Just <a href="https://www.linkedin.com/in/cernin"><strong>let me know</strong></a> if you attend.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35222c02cf22" width="1" height="1" alt=""><hr><p><a href="https://medium.com/tech-hunters/uikit-ui-library-with-reusable-frontend-components-35222c02cf22">“UIKit” — UI library with reusable FrontEnd components</a> was originally published in <a href="https://medium.com/tech-hunters">tech{hunters}</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>