<?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 Riku Rouvila on Medium]]></title>
        <description><![CDATA[Stories by Riku Rouvila on Medium]]></description>
        <link>https://medium.com/@rikurouvila?source=rss-40491e2352db------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9fksiR0k4Rf8PB8SUAanhQ.jpeg</url>
            <title>Stories by Riku Rouvila on Medium</title>
            <link>https://medium.com/@rikurouvila?source=rss-40491e2352db------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 09:44:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rikurouvila/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[Some heuristics I use for refactoring]]></title>
            <link>https://medium.com/@rikurouvila/some-heuristics-i-use-for-refactoring-c98c15502ee?source=rss-40491e2352db------2</link>
            <guid isPermaLink="false">https://medium.com/p/c98c15502ee</guid>
            <category><![CDATA[talks]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[refactoring]]></category>
            <dc:creator><![CDATA[Riku Rouvila]]></dc:creator>
            <pubDate>Mon, 19 Nov 2018 15:59:04 GMT</pubDate>
            <atom:updated>2018-11-19T15:59:04.092Z</atom:updated>
            <content:encoded><![CDATA[<p>A short presentation I gave at Futurice Tampere featuring some practical tips and tricks to achieve cleaner code and some core principles I follow when I refactor / maintain / write code.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1jNexdZUtVQ%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1jNexdZUtVQ&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1jNexdZUtVQ%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/8daf92558d2b0445392643c9f6deaa55/href">https://medium.com/media/8daf92558d2b0445392643c9f6deaa55/href</a></iframe><p><a href="https://www.youtube.com/watch?v=1jNexdZUtVQ">Video</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.icloud.com%2Fkeynote%2F0Kl8fQixPReVUo_1akGNdQ0WA%3Fembed%3Dtrue&amp;url=https%3A%2F%2Fwww.icloud.com%2Fkeynote%2F0Kl8fQixPReVUo_1akGNdQ0WA&amp;image=https%3A%2F%2Fp22-iworkthumbnailws.icloud.com%2Fiw%2Fws%2Fthumbnail%3Fshort_token%3D0Kl8fQixPReVUo_1akGNdQ0WA%26maxWidth%3D2048%26forceLandscape%3Dtrue%26cropAspectRatioHint%3D2%26socialMetaTagsForApp%3Dkeynote&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=icloud" width="600" height="498" frameborder="0" scrolling="no"><a href="https://medium.com/media/afb3f35bbc0cf3607df2c6121b383b31/href">https://medium.com/media/afb3f35bbc0cf3607df2c6121b383b31/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c98c15502ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s React?]]></title>
            <link>https://medium.com/@rikurouvila/whats-react-a211e8019fdb?source=rss-40491e2352db------2</link>
            <guid isPermaLink="false">https://medium.com/p/a211e8019fdb</guid>
            <category><![CDATA[talks]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Riku Rouvila]]></dc:creator>
            <pubDate>Tue, 06 Nov 2018 20:26:40 GMT</pubDate>
            <atom:updated>2018-11-17T13:56:32.370Z</atom:updated>
            <content:encoded><![CDATA[<p>Introductory lecture I gave at Tampere University of Technology about the core principles and how to get started with React.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FxAEr4lxuVL8&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DxAEr4lxuVL8&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FxAEr4lxuVL8%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/50ef85f44b645d0f00032cafc40e6643/href">https://medium.com/media/50ef85f44b645d0f00032cafc40e6643/href</a></iframe><p><a href="https://www.youtube.com/watch?v=xAEr4lxuVL8">Video</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.icloud.com%2Fkeynote%2F0slXDDC2M8_V9YFFx-ybHy_sg%3Fembed%3Dtrue&amp;url=https%3A%2F%2Fwww.icloud.com%2Fkeynote%2F0slXDDC2M8_V9YFFx-ybHy_sg&amp;image=https%3A%2F%2Fp22-iworkthumbnailws.icloud.com%2Fiw%2Fws%2Fthumbnail%3Fshort_token%3D0slXDDC2M8_V9YFFx-ybHy_sg%26maxWidth%3D2048%26forceLandscape%3Dtrue%26cropAspectRatioHint%3D2%26socialMetaTagsForApp%3Dkeynote&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=icloud" width="600" height="386" frameborder="0" scrolling="no"><a href="https://medium.com/media/54798ddb9da2519db6c84a5d08ec56de/href">https://medium.com/media/54798ddb9da2519db6c84a5d08ec56de/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a211e8019fdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSS Modules]]></title>
            <link>https://medium.com/@rikurouvila/talk-css-modules-8c9b546dc22?source=rss-40491e2352db------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c9b546dc22</guid>
            <category><![CDATA[talks]]></category>
            <category><![CDATA[css-modules]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Riku Rouvila]]></dc:creator>
            <pubDate>Mon, 05 Nov 2018 20:39:13 GMT</pubDate>
            <atom:updated>2018-12-30T19:59:45.286Z</atom:updated>
            <content:encoded><![CDATA[<p>Here’s an interesting talk about CSS modules I gave all the way back in 2016. What started as a set of rules and naming conventions known as BEM had now evolved into something even better: CSS modules. For me, this was definitely the first time I started seeing that using CSS as a thing completely separated from everything else is inherently a bad idea, and that it’s part of the reason CSS is so tedious to maintain.</p><p>I think these days writing CSS has gotten even better. Libraries like <a href="https://www.styled-components.com/">styled-components</a>, <a href="https://github.com/emotion-js/emotion">emotion</a> and similar are <strong>a must </strong>especially when using React and TypeScript. CSS modules still work, but you lose some nifty improvements we’ve gotten in 2 years.</p><p>Anyway: enjoy the talk and let me know what you think 👌</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fiu0w96wKJEk%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Diu0w96wKJEk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fiu0w96wKJEk%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/19a7ef6f69ede7fc08a1ecdf7b8f05c1/href">https://medium.com/media/19a7ef6f69ede7fc08a1ecdf7b8f05c1/href</a></iframe><p><a href="https://www.youtube.com/watch?v=iu0w96wKJEk">Video</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.icloud.com%2Fkeynote%2F0fa_MZ2PGfZ6dKW46CCWwYgwQ%3Fembed%3Dtrue&amp;url=https%3A%2F%2Fwww.icloud.com%2Fkeynote%2F0fa_MZ2PGfZ6dKW46CCWwYgwQ&amp;image=https%3A%2F%2Fp22-iworkthumbnailws.icloud.com%2Fiw%2Fws%2Fthumbnail%3Fshort_token%3D0fa_MZ2PGfZ6dKW46CCWwYgwQ%26maxWidth%3D2048%26forceLandscape%3Dtrue%26cropAspectRatioHint%3D2%26socialMetaTagsForApp%3Dkeynote&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=icloud" width="600" height="499" frameborder="0" scrolling="no"><a href="https://medium.com/media/91218abac5d01292756c8e4118994134/href">https://medium.com/media/91218abac5d01292756c8e4118994134/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c9b546dc22" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[We built our own UI component library and it was totally fine]]></title>
            <link>https://medium.com/@rikurouvila/talk-we-built-our-own-ui-component-library-and-it-was-totally-fine-33c7cfed4112?source=rss-40491e2352db------2</link>
            <guid isPermaLink="false">https://medium.com/p/33c7cfed4112</guid>
            <category><![CDATA[component-libraries]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[storybook]]></category>
            <category><![CDATA[talks]]></category>
            <category><![CDATA[design]]></category>
            <dc:creator><![CDATA[Riku Rouvila]]></dc:creator>
            <pubDate>Fri, 02 Nov 2018 23:08:10 GMT</pubDate>
            <atom:updated>2018-12-30T19:59:27.516Z</atom:updated>
            <content:encoded><![CDATA[<p>This is a talk I gave in Web Dev &amp; Sausages Vol. 8 in 2018 after having worked in multiple projects with custom UI component libraries. Enjoy!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F3pe7aWDU5DY%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D3pe7aWDU5DY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F3pe7aWDU5DY%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/ad766c0467dbac3849bfd368346edcdb/href">https://medium.com/media/ad766c0467dbac3849bfd368346edcdb/href</a></iframe><p><a href="https://www.youtube.com/watch?v=3pe7aWDU5DY">Video</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.icloud.com%2Fkeynote%2F0n8LMQMfkm2RXL2S0pgk9oWWw%3Fembed%3Dtrue&amp;url=https%3A%2F%2Fwww.icloud.com%2Fkeynote%2F0n8LMQMfkm2RXL2S0pgk9oWWw&amp;image=https%3A%2F%2Fp22-iworkthumbnailws.icloud.com%2Fiw%2Fws%2Fthumbnail%3Fshort_token%3D0n8LMQMfkm2RXL2S0pgk9oWWw%26maxWidth%3D2048%26forceLandscape%3Dtrue%26cropAspectRatioHint%3D2%26socialMetaTagsForApp%3Dkeynote&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=icloud" width="600" height="498" frameborder="0" scrolling="no"><a href="https://medium.com/media/a09527dd8bc6eac3f34a9014d70dd787/href">https://medium.com/media/a09527dd8bc6eac3f34a9014d70dd787/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33c7cfed4112" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Quick tip for testing React apps]]></title>
            <link>https://medium.com/@rikurouvila/quick-tip-for-testing-react-apps-27fa9d2d4674?source=rss-40491e2352db------2</link>
            <guid isPermaLink="false">https://medium.com/p/27fa9d2d4674</guid>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[enzyme]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Riku Rouvila]]></dc:creator>
            <pubDate>Fri, 02 Nov 2018 20:57:28 GMT</pubDate>
            <atom:updated>2018-11-03T18:21:07.926Z</atom:updated>
            <content:encoded><![CDATA[<h3>Testing React apps E2E-style</h3><p>Here’s a nice minimalistic approach I’ve recently used for testing React apps. It’s a great middle ground between the speed and configurability of unit tests and the coverage you would get only by writing end-to-end tests.</p><p><strong>The basic idea: </strong>Render the full React app with Enzyme, simulate events on it and assert everything is rendered correctly. It’s supposed to be used to verify all the basic user flows are always working and has no opinion about the underlying technical implementation.</p><p>It works no matter which store management library you’re using.</p><h4>Here’s how it works:</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/66922e6570bc3cdc3f49338fdd4e956d/href">https://medium.com/media/66922e6570bc3cdc3f49338fdd4e956d/href</a></iframe><p>So for each test case, we re-render the whole app. If your app uses Redux or some other library for state management, you’ll have to make sure the store also gets recreated. Same goes for the history object if you’re using react-router or similar.</p><h4>Why not test each component individually?</h4><ul><li>When something’s broken for the user, it doesn’t really matter if the individual components were working perfectly fine. This is to help you sleep at night knowing your core user flows are working.</li><li>Bugs often happen in between different components. It might happen for example that a component is passing invalid props to a component its using.</li><li>It’s not only the components you want to test. It’s also all of the action creators, reducers, router… Testing everything independently takes way more time both when writing and when maintaining the test cases. This method’s guaranteed to give you more 💥 for your 💵.</li></ul><h4>Why not use Cypress / Selenium / Nightwatch instead?</h4><p>I’m not saying you shouldn’t. Those tools are great for verifying the <strong>complete system is functioning properly. </strong>However, I would only use such tools for testing deployments / environment integrity and integrations because:</p><ul><li>Running tests on a real or a headless browser is slow. It’s unrealistic to expect everyone to run those tests every time they modify the codebase. This also makes them slow and tedious to write. <strong>Business cases tend to change more often than integrations between services.</strong></li><li>End-to-end tests are also fragile. What works on someone’s shiny 15&quot; MBP might not work on someone else’s machine. This is why I’d always run them on the same machine, for example on Travis CI.</li><li>Starting the whole stack, running the tests and stopping the stack with just one command can be tricky to set up. Especially considering that most developers want to have their dev environment running pretty much at all times.</li></ul><p>Do write E2E tests, but focus on integrations between services and only run the tests on Pull Requests before they’re merged.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27fa9d2d4674" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>