<?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 Bartłomiej Klocek on Medium]]></title>
        <description><![CDATA[Stories by Bartłomiej Klocek on Medium]]></description>
        <link>https://medium.com/@bartlomiej-klocek?source=rss-9862165fb681------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*W3MZzKjukv9JRgPc3g23lA.png</url>
            <title>Stories by Bartłomiej Klocek on Medium</title>
            <link>https://medium.com/@bartlomiej-klocek?source=rss-9862165fb681------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 15:14:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bartlomiej-klocek/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[Top 7 myths about Expo in 2021]]></title>
            <link>https://medium.com/swmansion/top-7-myths-about-expo-in-2021-ee66f929bf9f?source=rss-9862165fb681------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee66f929bf9f</guid>
            <category><![CDATA[react-native-development]]></category>
            <category><![CDATA[expo]]></category>
            <category><![CDATA[expo-cli]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[eas-build]]></category>
            <dc:creator><![CDATA[Bartłomiej Klocek]]></dc:creator>
            <pubDate>Tue, 05 Oct 2021 07:54:16 GMT</pubDate>
            <atom:updated>2021-12-03T07:56:07.149Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iNLNgwPXatpA6YDng0j8MA.png" /></figure><p>2021 is a very exciting year for developers who use Expo to build their mobile apps. The <a href="https://medium.com/u/df61a4267d7a">Expo</a> team with the assistance of the Software Mansion open-source team have been working hard on making React Native app development quicker and simpler; as a result of this progress, many statements on the web about what you can and can’t do with Expo tools and services are no longer true. In this article, I’m going to mention some most common myths and explain why they’re no longer true.</p><h3>Myth #1: You have to choose between React Native and Expo</h3><p>When you open <a href="https://reactnative.dev/docs/environment-setup">React Native installation docs</a>, you can see, that you can either start with <em>Expo CLI</em> and<em> React Native CLI</em>. It sounds like a difficult choice at the very beginning. When you choose Expo CLI, the setup process is much simpler, and you have all Expo SDK’s features available out of the box. Choosing RN CLI would require a little more manual work.</p><p>In case you chose to start with Expo and then changed your mind or need some advanced features like custom native code/libraries that aren’t included in the Expo SDK, there is always a door open — you can either <a href="https://docs.expo.dev/clients/introduction/">build a custom development client</a> or “eject” into bare React Native workflow (while still being able to use Expo SDK libraries).</p><p>Migration in the opposite direction is also possible — you can <a href="https://docs.expo.dev/bare/existing-apps/">read more about it here</a>.</p><h3>Myth #2: Expo doesn’t support custom native libraries</h3><p>Have you ever found an awesome React Native library and found out that it doesn’t work with Expo? Lack of support for third party native libraries was the biggest limitation of Expo managed workflow. You had to “eject” to bare workflow in order to be able to use custom native libraries.</p><p>Now, this limitation applies only to the Expo Go app and Classic Builds. Since Expo SDK 42, you can build “<a href="https://docs.expo.dev/clients/introduction/">your own custom Expo Go</a>” and include any native library you want. A custom client can be built either locally or in the cloud with EAS Build.</p><p>There are libraries requiring custom native configuration, e.g. modifying AndroidManifest.xml or Info.plist. Thanks to <a href="https://docs.expo.dev/guides/config-plugins/">Expo Config Plugins</a>, they can be set up without touching any native code. Some libraries are already shipped with a config plugin included.</p><h3>Myth #3: Ejecting is a very buggy and irreversible process</h3><p>Fortunately, not anymore. The whole<em> ‘ejecting’</em> process has been revisited and heavily reworked. But why did the Expo team focus on polishing the “quitting from Expo” functionality? There is a couple of reasons. One is that it’s used internally in EAS Build for building managed apps, and the other is that the Expo team changed their mindset over the last couple of years and consider managed and bare to both be first-class ways of using the tools.</p><p>To be clear, ejecting doesn’t have to mean “quitting”. The expo eject command is only generating android and ios directories + index.js. When you delete them manually, you can eject again. Expo CLI has another command: expo prebuild which currently does the same, but it doesn’t sound like it’s a one-way ticket.</p><h3>Myth #4: Apps built with Expo are heavyweight</h3><p>When we’re talking about “Classic Builds” (expo build:[android|ios]), app size is one of the largest drawbacks. Every app built using expo build is actually a kind of the <em>Expo Go</em> app but modified to run only your app’s JavaScript. It contains all Expo native SDK libraries, even those which you are not using in your app.</p><p>Why is it a myth then? Because Expo’s new build service — <a href="https://docs.expo.dev/build/introduction/">EAS Build</a> solves this problem. When building a managed app, it <em>prebuilds</em> it first — prepares native projects including only libraries specified in package.json.</p><h3>Myth #5: Bare workflow / non-Expo apps cannot be built with Expo</h3><p>Yes and no. Classic Builds (expo build command) can build Expo managed apps only. But the new <a href="https://docs.expo.dev/build/introduction/">EAS Build</a> service does not have such limitations and can build any React Native app, including Expo managed ones.</p><h3>Myth #6: Managed apps cannot be built locally</h3><p>Let’s suppose you have created your app using Managed workflow and you were testing it in the Expo Go app. Now you want to build a standalone binary. At first glance, the expo build command is the only way to do this. But not everyone wants to upload their app’s code to the cloud and wait until the build finishes. This is kind of a myth within a myth since you could always use <a href="https://github.com/expo/turtle-cli-example">Turtle-CLI</a> to build locally too.</p><p>What if you want to build your managed app locally? You can use expo run:android or expo run:ios (if you have a Mac) commands. The only requirement is to have Android SDK / Xcode set up. Another option is to <a href="https://docs.expo.dev/build-reference/local-builds/">run EAS Build locally</a> (eas build --local). The main difference compared to expo run is that it lets Expo handle the credentials management (app code signing etc.) for you.</p><h3>Myth #7: EAS Build is a paid-only service</h3><blockquote><strong>Update Nov 2021:</strong> EAS has a free tier now! Check out the <a href="https://blog.expo.dev/introducing-eas-395d4809cc6f">announcement blog post here</a>. 🎉</blockquote><p>As of writing this article, this one is actually true. Then why did I put it here? Many people think it is going to be paid-only forever. Fortunately, when looking at the <a href="https://expo.dev/pricing">EAS Pricing page</a>, we can see that EAS Build is a <em>Preview feature </em>and there’s a small asterisk sign saying:</p><blockquote>After graduating from preview, these services will be available under the free plan.</blockquote><p>The free tier is going to be similar to the current Classic Builds (expo build) tier. Finally, EAS Build is going to fully replace classic builds. When will EAS graduate from preview? I don’t know, probably later this year. For now, you can have 1 month free to try EAS out. All you have to do is to sign up for the EAS Priority plan, then cancel your subscription before you get charged and if you don’t have access to a credit card you can DM <a href="https://medium.com/@expo">@expo</a> on Twitter to get access.</p><p>I hope this article explained some common myths about Expo. If you see any of these myths being perpetuated, feel free to put a link to this article.</p><ul><li><a href="https://blog.expo.dev/introducing-custom-development-clients-5a2c79a9ddf8">Introducing: Custom Development Clients</a></li><li><a href="https://blog.expo.dev/expo-managed-workflow-in-2021-5b887bbf7dbb">Expo managed workflow in 2021</a></li><li><a href="https://blog.expo.dev/expo-managed-workflow-in-2021-d1c9b68aa10">Expo managed workflow in 2021</a></li><li><a href="https://blog.expo.dev/introducing-expo-run-commands-835ae8da4813">Introducing: Expo Run Commands</a></li><li><a href="https://docs.expo.dev/workflow/customizing/">Add custom native code</a></li><li><a href="https://docs.expo.dev/build/introduction/">EAS Build</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee66f929bf9f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swmansion/top-7-myths-about-expo-in-2021-ee66f929bf9f">Top 7 myths about Expo in 2021</a> was originally published in <a href="https://medium.com/swmansion">Software Mansion</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Knowing this Kotlin pitfall may save you from bugs]]></title>
            <link>https://bartlomiej-klocek.medium.com/knowing-this-kotlin-pitfall-may-save-you-from-bugs-b9744060c7ad?source=rss-9862165fb681------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9744060c7ad</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Bartłomiej Klocek]]></dc:creator>
            <pubDate>Sun, 12 Sep 2021 05:58:06 GMT</pubDate>
            <atom:updated>2021-09-13T00:50:46.063Z</atom:updated>
            <cc:license>http://creativecommons.org/licenses/by/4.0/</cc:license>
            <content:encoded><![CDATA[<h3>Knowing this Kotlin pitfall can save you from bugs</h3><p>Kotlin is an awesome language, but its “syntax sugar” can sometimes be confusing. Although this particular thing is mentioned in the documentation, it’s easy to miss. Let’s start with an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pNmibe0TKPctPD5dmKOyVw.png" /></figure><p>We have a class AspectRatioScreen with one property, which defaults to old good 4:3. Then we have ResolutionScreen with width and height properties. Their setters automatically update the aspect ratio.</p><p>In main we create a ResolutionScreen object and print its parameters. By default, the resolution is set to 1920x1080 which corresponds to 16:9 aspect ratio. But the program output is:</p><pre>Screen resolution: 1920x1080, ratio: 4/3</pre><p>The aspect ratio doesn’t match the resolution. Why? The <a href="https://kotlinlang.org/docs/properties.html#getters-and-setters">Kotlin documentation</a> says:</p><blockquote>If you define a custom setter, it will be called every time you assign a value to the property, except its initialization.</blockquote><p>This means that setting width’s and height`s initial dimensions doesn’t call their setters. One way to fix it would be to add a init block inside the ResolutionScreen class:</p><pre><strong>class </strong>ResolutionScreen : AspectRatioScreen() {<br>    <strong>var width </strong>= 1920<br>        <strong>// ...</strong><br>    <strong>var height </strong>= 1080<br>        <strong>// ...</strong><br><br>    <strong>init </strong>{<br>        <strong>width </strong>= 1920<br>        <strong>height </strong>= 1080<br>    }<br>}</pre><p>This will re-assign the default values and call setters. The displayed result is now correct:</p><pre>Set width to 1920<br>Set height to 1080<br>Screen resolution: 1920x1080, ratio: 16/9</pre><p>This solution has one drawback: You have to declare the default value twice because properties cannot be left without an initializer. A workaround would be to define constants: private const val DEFAULT_WIDTH = 1920 and using them in both places.</p><p>The simplest solution is to call reacalculateAspectRatio() directly inside the init block:</p><pre><strong>class </strong>ResolutionScreen : AspectRatioScreen() {<br>    <strong>var width </strong>= 1920<br>        <strong>// ...</strong><br>    <strong>var height </strong>= 1080<br>        <strong>// ...</strong><br><br>    <strong>init </strong>{<br>        recalculateAspectRatio()<br>    }<br>}</pre><p>This is the clearest solution for this particular situation. There’s another way of doing this, which looks better when there is a single property, for which we want to initialize its <em>backing property</em>:</p><pre><strong>class</strong> Duration {<br>    <strong>var durationInSeconds</strong>: Int = 1<br>}</pre><pre><strong>class</strong> EnhancedDuration : Duration() {<br>    <strong>var durationInHours</strong> = 1.<strong>also</strong> { durationInSeconds = 3600 * <strong>it</strong> }<br>        <strong>// ...</strong><br>}</pre><p>This syntax has one advantage — we initialize the backing property (durationInSeconds in this case) in the same place we initialize the original property.</p><p>In the case of our example it would look like this:</p><pre><strong>class </strong>ResolutionScreen : AspectRatioScreen() {<br>    <strong>var width </strong>= 1920<br>        <strong>set</strong>(value) {<br>            <strong>field </strong>= value<br>            recalculateAspectRatio()<br>        }<br>    <strong>var height </strong>= 1080.<strong><em>also</em></strong><em> </em><strong>{ aspectRatio </strong>= width divBy <strong>it</strong> <strong>}<br>        set</strong>(value) {<br>            <strong>field </strong>= value<br>            recalculateAspectRatio()<br>        }<br><br>    <strong>// ...</strong><br>}</pre><p>The also block is only present in the height initializer, because the initialization goes from top to bottom — we cannot use width nor height before they’re initialized. Even inside the also block, height cannot be used, because it’s yet to be initialized. That’s why in cases where two or more properties are somehow related, it’s better to use init blocks.</p><p>That’s all, Happy coding!</p><p><a href="https://kotlinlang.org/docs/properties.html#getters-and-setters">Properties | Kotlin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9744060c7ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to integrate react-native-firebase into Expo]]></title>
            <link>https://bartlomiej-klocek.medium.com/how-to-integrate-react-native-firebase-into-expo-d34712eaf64d?source=rss-9862165fb681------2</link>
            <guid isPermaLink="false">https://medium.com/p/d34712eaf64d</guid>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react-native-firebase]]></category>
            <category><![CDATA[expo]]></category>
            <dc:creator><![CDATA[Bartłomiej Klocek]]></dc:creator>
            <pubDate>Sat, 03 Jul 2021 08:03:40 GMT</pubDate>
            <atom:updated>2021-08-09T06:46:19.000Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>How to integrate react-native-firebase with Expo</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SgGAG65ER5KhAPh4sTBg8g.png" /></figure><blockquote>Over a year ago I wrote an article about a kind of hacky way to use react-native-firebase in Expo app. But things have changed significantly since then. In this article, I’m going to show you the new, much easier way to do this.<br>This is also a getting started guide for <a href="https://blog.expo.io/introducing-custom-development-clients-5a2c79a9ddf8">new features that Expo has released recently</a>.</blockquote><p><em>TL;DR Scroll down, there’s a tutorial down below. </em>😉</p><h4>A long time ago…</h4><p>It was <em>Expo SDK 36’s</em> when I was trying to integrate native Firebase with an Expo app. It was a tough time because Expo <em>barely</em> supported custom native code. That is — I had to eject to <em>bare</em> workflow in order to be able to use any native library. And ejecting meant that I couldn’t use expo build anymore to build my app. Expo Client (now called <em>Expo Go</em>) didn’t support custom native code either.</p><p>Since I didn’t want to opt out of Expo Go for development, I came up with the idea of using Expo-compatible Firebase Web (JavaScript) SDK in development and, at the same time, keeping ejected native projects with the more performant and fully featured native SDKs installed using <a href="https://rnfirebase.io/">react-native-firebase</a>. I had a common JS codebase, which deduced in which environment it runs (Expo Go or bare RN app) and automatically switched to the correct Firebase backend.</p><p>My solution was working, but it was very cumbersome to maintain in further project stages. I had to take care of both bare and managed app separately. Things like permissions, app icon, or splash screen required separate steps for Android, iOS and managed app. Nightmare.</p><h4>The new, right way!</h4><p>Fortunately, Expo made huge progress! Thanks to the <a href="https://docs.expo.io/guides/config-plugins/">config plugin system</a>, managed apps can be easily <em>prebuilt </em>to generate native projects, also with third-party libraries. Their new <a href="https://docs.expo.io/build/introduction/">EAS Build</a> service can build both managed and bare (!) apps. And recently released <a href="https://blog.expo.io/introducing-custom-development-clients-5a2c79a9ddf8">development clients</a> allow you to build your own, customized Expo Go with any native code you wish! Impressive, isn’t it?</p><p>Ok, I’m hyped about that new wonderful Expo stuff, but what does it mean in the context of my Firebase integration? Let me explain briefly:</p><ul><li>I’m building my app using a semi-managed workflow. That is: I do everything like it was managed workflow, but I also have some JavaScript code, which calls native libraries like react-native-firebase.</li><li>Instead of the <em>Expo Go</em> app, I’m using my custom <a href="https://docs.expo.io/clients/introduction/">development client</a> with <em>react-native-firebase</em> bundled with it.</li><li>Each time I need a native change, e.g. install a native library, I rebuild my Dev Client using either EAS Build or locally using expo run:android / expo run:ios. You can read more about these commands <a href="https://blog.expo.io/introducing-expo-run-commands-835ae8da4813">in this blog post</a>.</li><li>If a native library requires custom configuration — e.g. adding some code or modifying Android manifest, that configuration is applied during <em>prebuilding</em> phase thanks to <a href="https://docs.expo.io/guides/config-plugins/">Config Plugins</a>.</li><li>A <em>prebuild</em> is actually very similar to <em>eject</em>, but its name no longer sounds like it’s a one-way ticket. It’s designed to be run multiple times, without losing the possibility to use Expo managed features.</li></ul><p>The whole process has been explained more deeply in the blog series: <em>Expo Managed Workflow in 2021 — </em><a href="https://blog.expo.io/expo-managed-workflow-in-2021-5b887bbf7dbb"><em>part one</em></a><em>, </em><a href="https://blog.expo.io/expo-managed-workflow-in-2021-d1c9b68aa10"><em>part two</em></a><em>.</em></p><h3>Cool, but… how to make it work? 🤔 A detailed step-by-step guide is here!</h3><p>Ok, that was so much talking. Let’s dive straight into the actual solution:</p><p>First of all, ensure that you have the latest expo-cli installed. You can quickly do it with yarn global add expo-cli.</p><p><strong>1. Start a project</strong><br>If you have an existing managed Expo project, you can use it here, but please <em>git commit</em> first to make a checkpoint. I wouldn’t recommend using bare projects since prebuilding has undefined behavior on existing native projects! This doesn’t mean that you can’t use development clients in bare apps — you just have to <a href="https://docs.expo.io/clients/installation/">install it manually</a>.</p><blockquote><strong>Tip</strong>: When creating new project, you can run npx create-react-native-app -t with-dev-client to have a custom development client already set up. However, I decided to show more manual/universal solution, which should also work for existing projects.</blockquote><p>I chose to start a new managed project and selected a <em>blank (TypeScript)</em> template:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wtSi7r6GQO4wX04Xuyyv0w.png" /><figcaption>Creating an app with expo init</figcaption></figure><p><strong>2. Set up a development client</strong><br>We want to develop our app with a custom development client. In order to do that, install a proper module:</p><pre>expo install expo-dev-client</pre><p>This package makes your debug native configuration build a custom development client. The release configuration remains unchanged; it builds a production app without the expo-dev-client code included, aside from a few header files.</p><p><em>Since you’ll be building your app anyway, you can skip this step for now and come back later. If so, jump straight to Firebase installation.</em></p><p><em>When running commands from below for the first time, you’ll be asked for Android Application ID (package name) and iOS Bundle Identifier, unless you have provided them earlier in </em><em>app.json.</em></p><p>Try to build and start your dev client by running either expo run:android or expo run:ios. Alternatively, you can also use EAS Build to do the job, but unless you created a project from with-dev-client template, you’ll have to <a href="https://docs.expo.io/clients/eas-build/">configure </a><a href="https://docs.expo.io/clients/eas-build/">eas.json yourself</a> (you can use eas build:configure to automate this).</p><blockquote><strong>Note</strong>: expo run commands start Metro bundler by default unless --no-bundler flag is provided. To start the bundler without triggering the build process, use expo start --dev-client.</blockquote><p>If everything goes well, after a short while you should see your custom development client running on an emulator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PosvcsMMFGMhUNlMSEANVA.png" /><figcaption>A running Development Client</figcaption></figure><p><strong>3. Install Firebase</strong><br>Now you can install react-native-firebase JS libraries of your choice. In my app I want to use the Firestore module:</p><pre>expo install @react-native-firebase/app @react-native-firebase/firestore</pre><p>In the meantime, you need to open the Firebase Console and create Android and iOS apps for your project. You’ll be asked about Android App ID and iOS Bundle Identifier. You have to provide the same values that you typed in earlier.<em><br></em>Please download the google-services.json and GoogleServices-Info.plist — we’re going to need them in a moment.</p><p>Are we ready? Almost. When you visit the <a href="https://rnfirebase.io/">react-native-firebase website</a>, you can see that installation steps require native changes. This is where config plugins unleash their power. A plugin’s purpose is to apply native configuration changes each time when building with EAS Build or running expo prebuild / expo run, without bothering you with native stuff.</p><p>Fortunately, React Native Firebase (since version 12.4.0) <a href="https://rnfirebase.io/#expo">is shipped with some built-in plugins</a>, which do all the necessary configuration. If the plugins weren’t shipped, you’d need to read the <a href="https://docs.expo.io/guides/config-plugins/">config plugins guide</a>, but because they are, all you have to do is to add them to the plugins section in your app.json and provide paths to Google-Services files. Your app.json file should contain these lines:</p><pre>{<br>  &quot;expo&quot;: {<br>    &quot;android&quot;: {<br>      &quot;googleServicesFile&quot;: &quot;./google-services.json&quot;<br>    },<br>    &quot;ios&quot;: {<br>      &quot;googleServicesFile&quot;: &quot;./GoogleService-Info.plist&quot;<br>    },<br>    &quot;plugins&quot;: [<br>      &quot;@react-native-firebase/app&quot;<br>    ]<br>  }<br>}</pre><p><em>If, for some reason, you need to use older React Native Firebase version than 12.4.0, you can use the </em><a href="https://www.npmjs.com/package/with-rn-firebase"><em>with-rn-firebase</em></a><em> plugin, which has very similar functionality.</em></p><p>The plugin idea doesn’t only apply to Firebase; it applies to any native library that requires additional configuration after linking. Since the config plugins API is pretty new, there aren’t yet many libraries that support config plugins. That’s a large area for open-source contributors. You are very welcome to help developing config plugins for your favourite libraries!</p><p><strong>4. Run your app</strong><br>Now, all that’s left to do is to build your app again (EAS Build / expo run) and you are free to start using Firebase!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/840/1*4OnWKtJS_U3xflJLU7TGeA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*DzQyX-1xl-iLFh2-HZcThQ.png" /><figcaption>A quick example of Firestore usage in an Expo app</figcaption></figure><p>This way you have set up react-native-firebase in your own custom Expo Go… I mean development client 😅. Of course, the stuff described in this article is only the tip of an iceberg. There are many more awesome features, including a <a href="https://docs.expo.io/clients/extending-the-dev-menu/">customizable developer menu</a>. You may also want to share your custom dev client with your team/friends, or even <a href="https://github.com/expo/expo-preview-action">automate it with the CI</a>. You can learn more about all that stuff in <a href="https://docs.expo.io/clients/introduction/">Expo Docs</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d34712eaf64d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Testing in Node.js: Easy way to mock filesystem]]></title>
            <link>https://bartlomiej-klocek.medium.com/testing-in-node-js-easy-way-to-mock-filesystem-883b9f822ea4?source=rss-9862165fb681------2</link>
            <guid isPermaLink="false">https://medium.com/p/883b9f822ea4</guid>
            <category><![CDATA[jest]]></category>
            <category><![CDATA[filesystem]]></category>
            <category><![CDATA[mocking]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Bartłomiej Klocek]]></dc:creator>
            <pubDate>Sat, 03 Apr 2021 14:59:47 GMT</pubDate>
            <atom:updated>2021-07-04T15:27:02.909Z</atom:updated>
            <content:encoded><![CDATA[<h3>Testing filesystem in Node.js: The easy way</h3><p>When writing applications in Node, you often need to write or read the contents of a file. Node.js provides a <a href="https://nodejs.org/api/fs.html">fs</a> library dedicated to this purpose. But how do we deal with the filesystem when testing our code?</p><p>I’m going to present two approaches to this problem – by mocking individual filesystem methods and by using virtual file in-memory file system. I’m also going to explain why the latter is a much better choice than the former.</p><h3>Mocking individual methods</h3><p>The simplest solution is to directly mock individual methods of the fs module. Let’s assume we have a method that reads the first 5 bytes from a file and checks if its contents start with correct header, for example <em>”hello”</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bTEadEnROVPyeKJo0Cpyhg.png" /><figcaption>Tested function — using blocking calls</figcaption></figure><blockquote><em>We could, of course, use </em><em>fs.readFile() and read whole file contents, but it’s really a bad idea when we deal with large files.</em></blockquote><p>We can pretty easily test the method by mocking fs.readSync():</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vko8DpTspsaUSPx6_KwBdg.png" /><figcaption>Testing synchronous filesystem call</figcaption></figure><p>The test seems to be pretty simple, but our tested function has one drawback — its implementation uses blocking calls, which blocks the whole JavaScript thread when performing filesystem I/O operations. Let’s rework our method to use asynchronous, non-blocking calls. Node.js comes with <a href="https://nodejs.org/api/fs.html#fs_promises_api">fs/promises</a> library for this purpose:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g1snbmsy2C42bR-x_2H3PA.png" /><figcaption>Reworked function to use asynchronous filesystem API</figcaption></figure><p>Let’s rewrite tests to use async fs/Promises API:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dyPEHdQGUzCmDIovpUbLQw.png" /><figcaption>Testing asynchronous method dealing with filesystem</figcaption></figure><p>Ouch, our mock function has grown and became much less readable. We wanted to mock read() function, but to achieve correct results we also had to mock open() and close(). And this is just a simple scenario!</p><p>The above method may be sufficient for basic cases, but it becomes very verbose and error-prone for more advanced scenarios. It’s also implementation dependant. To overcome these problems, we should change our testing approach. Instead of mocking individual fs functions, we can mock the whole filesystem.</p><h3>Using virtual filesystem as mock</h3><p>In this approach, we replace the real filesystem with an in-memory one. There are a few libraries solving this problem, a popular one is mock-fs, but I’d like to give memfs a try. This is a simple, but powerful and well-documented library for managing virtual volumes. It reimplements fs API one-to-one, so it’s perfect to use it as a mock. Moreover, it’s implementation agnostic — it works well with plain fs, fs/promises as well as other libraries like<a href="https://www.npmjs.com/package/fs-extra">fs-extra</a>.</p><p>Let’s rework our tests to use the virtual filesystem. Firstly, we need to add memfs dependency:</p><pre>yarn add -D memfs<br># or using npm<br>npm i --save-dev memfs</pre><p>We also should add <a href="https://jestjs.io/docs/manual-mocks">manual mocks</a> for fs and fs/promises modules. Create a __mocks__ directory in our project root <em>(or use </em><em>jest.config.js to configure it as you wish) </em>and create a fs.js file there:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eDv-U306XO94dmMmOQ-LwA.png" /><figcaption>fs module mock</figcaption></figure><p>If you’re using fs/promises API, you should also create __mocks__/fs/promises.js file:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jmgmCmolulaD_i9mjdSxtQ.png" /><figcaption>fs/promises module mock</figcaption></figure><p>Now let’s update our test to use our in-memory filesystem mocks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HCWfitbVgS793s5ciPrWVg.png" /><figcaption>Example test using memfs as virtual filesystem</figcaption></figure><p>Our test became very simple and straightforward. We write file contents like it was a real file and then pass its path to the tested function. And we don’t have to care about filesystem implementation used in checkHelloAsync.</p><p>It’s a good practice to reset the virtual volume before each test — it avoids tests interfering with each other if more than one test manipulates on the same filesystem path.</p><p>We can see that bothfs and fs/promises are mocked. That’s because checkHelloAsync() uses fs/promises in its implementation, but for demonstrational purposes I used fs-extra in tests. In real life, you should stick to one of them everywhere (I personally prefer fs-extra).</p><h4>Creating directory structure from JSON</h4><p>Mocking files instead of methods is very convenient, but there’s one drawback of the method shown above. Imagine your application operates not on a single file, but on a whole directory structure. Creating it manually using plenty of fs.mkdirp and fs.writeFile may be cumbersome. Fortunately, memfs has another useful feature: directory structure created from a JSON object. Its keys are paths and values refer to file contents. Let’s have a look at the example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OF2VwvRC9kK5ioXhuKS3ow.png" /><figcaption>Using JSON to generate directory structure</figcaption></figure><p>Now we can create even complicated directory structures using single vol.fromJSON() call. We can even split it into multiple calls and extract to helper functions — it may be useful in more sophisticated test suites. Or even mix vol.fromJSON with fs methods — they will not overwrite each other (unless modifying the exact same path) until vol.reset() is called.</p><h4>Mixing real and virtual filesystems</h4><p>There’s one more thing worth mentioning. You may be using the in-memory filesystem, but need to reach some real files — for example some test fixtures, which are not easy to prepare using fs calls. There’s a library called unionfs which lets you join both filesystems. You may find documentation and examples on both libraries sites:</p><ul><li><a href="https://github.com/streamich/memfs">memfs github page</a></li><li><a href="https://github.com/streamich/unionfs">unionfs github page</a></li></ul><h3>Conclusion</h3><p>The virtual filesystem is definitely a thing that is worth using when testing any filesystem-touching code. It’s much more flexible and straightforward approach than mocking individual methods.</p><p>This article is just a brief introduction to this approach. Please refer to the libraries’ official docs for more details.</p><p>All code examples from this article are available <a href="https://gist.github.com/barthap/e0a672e9000e72cdfbca73e4f2702f5e">on my GitHub</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=883b9f822ea4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Controlling multiple RGB strips using AVR XMEGA microcontroller]]></title>
            <link>https://bartlomiej-klocek.medium.com/controlling-multiple-rgb-strips-using-avr-xmega-microcontroller-165ff49298b9?source=rss-9862165fb681------2</link>
            <guid isPermaLink="false">https://medium.com/p/165ff49298b9</guid>
            <category><![CDATA[microcontrollers]]></category>
            <category><![CDATA[pwm]]></category>
            <category><![CDATA[avr]]></category>
            <category><![CDATA[rgb]]></category>
            <dc:creator><![CDATA[Bartłomiej Klocek]]></dc:creator>
            <pubDate>Sat, 11 Apr 2020 11:39:50 GMT</pubDate>
            <atom:updated>2020-04-11T11:39:50.531Z</atom:updated>
            <content:encoded><![CDATA[<h3>Control many RGBs with AVR XMEGA microcontroller &amp; Fade effect tutorial</h3><p>When you are making a LED project, you often need to control it using PWM. For RGB projects you need at least 3 PWM channels. If you wanted to control 10 individual RGBs, you need 30 PWM channels, unless you use external driver IC or digital LEDs like WS2812.<br>Most AVR microcontrollers don’t have that many hardware PWM channels. You can do software PWM emulation, but it costs precious CPU time (unless it has nothing other to do), so we’d like to stay with hardware solutions.</p><p>Microcontrollers from XMEGA family are called “Atmega on steroids”, because they are like normal AVRs, but with many useful features. IMO they are very underrated today. One of their features solves our problem.<br>Most of XMEGA microcontrollers have built-in 2–4 <em>Timers/Counters type 2</em>. It is normal 16-bit timer with four Compare Channels (PWM channels), but it has one special feature — it can be split into two 8-bit timers, with 4 compare channels each. This gives us 8 PWM channels per one timer. With 4 timers, that is 32 PWM channels! We are able to control 10 RGB strips.</p><h4>Timer configuration</h4><p>Let’s write a simple codebase to control 8 PWM channels. I’ll use a real world example — I’ve done this configuration in my room. It has two RGB strips and two single color LEDs:</p><ul><li>Bed RGB — RGB strip over my bed</li><li>Window RGB</li><li>Desk white LED</li><li>Bookshelf white LED</li></ul><p>Development tools I use Atmel Studio 7, an Atmel ICE programmer with PDI interface. The code is written in modern C++, built using avr-g++ with -std=c++11 flag. But of course it is possible to write it in plain C, the code would need only slight changes.</p><p>To initialize PWM, we need to set a few registers, but it is pretty simple:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0c3ff1a5dd52b63c50fa79c2ebae77e0/href">https://medium.com/media/0c3ff1a5dd52b63c50fa79c2ebae77e0/href</a></iframe><p>Now, when you want to set PWM value for specified channel, you can do it this way:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e83f989142afe31683c5d83359c896a5/href">https://medium.com/media/e83f989142afe31683c5d83359c896a5/href</a></iframe><p>And that’s all! Additionally you can use enum or #define to name the channels. Here’s an example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/17f77b055034c94d6f878bfeb0fbb117/href">https://medium.com/media/17f77b055034c94d6f878bfeb0fbb117/href</a></iframe><p>Please note that used timer 2 instance must be the connected to used IO port — for instance if you want to use Port D pins, you have to select TC<strong><em>D</em></strong>2.</p><h4>Adding fade effect</h4><p>Now we’re going to add a simple fade effect. It will let us go smoothly from one color to another. I have done it using C++ features.<br>Firstly, let’s create a pair of files: header LedController.hand source LedController.cpp. Here’s the first one:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0de6ce6337531d353a14d8c470671f1f/href">https://medium.com/media/0de6ce6337531d353a14d8c470671f1f/href</a></iframe><p>Class PWMController does the same functionality described in previous section — hardware timer configuration, but in C++ like way. Class FxController handles fade effect. It is one level of abstraction higher as it takes PWMController instance as constructor parameter.</p><p>Now it’s time for LedController.cpp file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/565d6e6acd287717423242444d5c8225/href">https://medium.com/media/565d6e6acd287717423242444d5c8225/href</a></iframe><p>To use fade effect, we need to call it regularly, for example every 10ms. We can use a timer which causes an interrupt. Let’s go straight to example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/24a11054523b0ec05cc385897f448028/href">https://medium.com/media/24a11054523b0ec05cc385897f448028/href</a></iframe><p>Fade updates even during delay_ms() thanks to being called inside interrupt.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=165ff49298b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fix your Raspberry Pi 4B USB-C cable issue at home]]></title>
            <link>https://bartlomiej-klocek.medium.com/fix-your-raspberry-pi-4b-usb-c-cable-issue-at-home-45b68f9a8514?source=rss-9862165fb681------2</link>
            <guid isPermaLink="false">https://medium.com/p/45b68f9a8514</guid>
            <category><![CDATA[usb-type-c]]></category>
            <category><![CDATA[usb-c]]></category>
            <category><![CDATA[raspberry-pi-4]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[Bartłomiej Klocek]]></dc:creator>
            <pubDate>Fri, 27 Mar 2020 13:05:17 GMT</pubDate>
            <atom:updated>2020-03-27T13:05:17.831Z</atom:updated>
            <content:encoded><![CDATA[<p>Raspberry Pi 4B has one well known issue — it doesn’t power up when plugged using some USB-C cables. It may work with old USB-C to USB 2.0 cable, but, for instance, with original MacBook charger it doesn’t. In general, it won’t work with electrically marked (e-marked) cables, but works well with ‘dumb’ cables.</p><p>This issue has recently been fixed in revision 1.2 of Raspberry board, however you can still come across older hardware versions. To check your board revision, see <a href="https://www.raspberrypi.org/documentation/hardware/raspberrypi/revision-codes/README.md">this page</a>.</p><p>It turns out, that RPi board does not follow the USB-C electrical specification. In brief, USB-C has two CC (Configuration Channel) lines — CC1 and CC2, which are used to determine what kind of device the cable is connected to, based on resistance given at their ends. Regular cables have them unconnected, but e-marked ones monitor resistance at their ends and can cut-out power line. To get powered properly, the device should have both of them connected to ground through independent 5.1kΩ resistors. However, Raspberry Pi 4 has them shorted together and grounded through only one resistor. For USB-C cable Raspberry is detected as an audio adapter accessory. An in-depth detailed description can be found <a href="https://hackaday.com/2019/07/16/exploring-the-raspberry-pi-4-usb-c-issue-in-depth/">here</a>.</p><h4>The fix</h4><p>Fortunately, a workaround is possible, however it requires some precision and basic soldering skills.</p><p><strong>If you are not careful enough and do something wrong, you may damage your Raspberry Pi! Read three times before proceeding and cease if something is not clear to you. Be warned.</strong></p><p>You will need a few things:</p><ul><li>A 5.1kΩ resistor (5.6k works too, checked). THT 0.125 or 0.25W, the smaller resistor, the easier</li><li>Needle or stick pin</li><li>Soldering iron and a bit of solder</li><li>Pliers/tweezers</li><li>A magnifier might be useful</li></ul><p>We are going to lift CC1 pin from USB-C connector on Raspberry board and connect it through resistor to ground. When looking from rear side of the connector, it is 4th pin from the right, marked in the <a href="https://www.toby.co.uk/uploads/publications/2205.pdf">datasheet</a> as A5.</p><ol><li>Use needle to rip up plastic cover on rear side of the connector, just above 4th pin on the right. You need to scratch only a small amount to make the pin inside the connector (behind plastic) visible. It goes vertically from the board to about a half of connector height.</li><li><strong>Carefully</strong> pry the pin at the bottom (as close to the board as possible) until it breaks out from onboard pad. <strong>Do not mistake the pin! Check twice if you are working with right pin!</strong></li><li>Using needle, lift the pin up until it goes almost parallel to the board.</li><li>Prepare your resistor — bend and cut its pins to fit in and make soldering easier. One side of the resistor will be connected to lifted pin, and the other to top pad of a big diode between USB-C and MicroHDMI connector (see photo below).</li><li>Use tweezers to hold your resistor and solder one ending (direction doesn’t matter) to lifted pin, then the other ending to diode pad (the one closer to the board edge). Final effect should look similar to photo below.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cs-IpEf-w_loGHx46hnD8Q.jpeg" /><figcaption>Unfortunately, I didn’t take photos before soldering the resistor</figcaption></figure><p>Now, if you’ve done everything correctly, you should be able to power your Raspberry Pi 4B using electrically marked USB-C cables.</p><p><em>Thanks to Raspipat, who shared his fix in </em><a href="https://www.raspberrypi.org/forums/viewtopic.php?t=249975#p1526692"><em>this</em></a><em> post.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45b68f9a8514" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I got Expo and react-native-firebase working in one project?]]></title>
            <link>https://bartlomiej-klocek.medium.com/how-i-got-expo-and-react-native-firebase-working-in-one-project-4772d449cb69?source=rss-9862165fb681------2</link>
            <guid isPermaLink="false">https://medium.com/p/4772d449cb69</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[expo]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[Bartłomiej Klocek]]></dc:creator>
            <pubDate>Mon, 23 Mar 2020 11:14:58 GMT</pubDate>
            <atom:updated>2021-07-04T15:17:41.579Z</atom:updated>
            <content:encoded><![CDATA[<p>I got used to using Expo. It has many useful and ready to use libraries and an awesome Client app. Recently I’ve been working on React Native app, which used Firebase Cloud Firestore as the main database.</p><blockquote>❗ <strong>Update 07/2021:</strong> This article has become outdated and the solution described . I’ve written <a href="https://bartlomiej-klocek.medium.com/how-to-integrate-react-native-firebase-into-expo-d34712eaf64d">a new article</a> describing a lot better approach to this problem. <a href="https://bartlomiej-klocek.medium.com/how-to-integrate-react-native-firebase-into-expo-d34712eaf64d">You can find it here.</a> 🔥</blockquote><p>❌ <strong>The content below is outdated, I strongly discourage you from using the solutions described there. </strong>For a better solution, please see the update above.</p><h4>The problem</h4><p>When using Expo with managed workflow, installing react-native-firebase directly is impossible, because Expo doesn’t support native modules. <a href="https://docs.expo.io/versions/v36.0.0/guides/using-firebase/">Expo documentation says</a>, that we have two ways:</p><ul><li>Use Firebase Web JS SDK</li><li>Use Expo bare workflow</li></ul><p>First way is easy, but limited (only few modules are supported) and slower, because we resign from native support and do everything in JS thread.</p><p>The second way allows me to install and use any native modules, but they will not work in Expo Client. When there are only few components that use native modules, that is not a big deal, but the problem starts when whole app is using on native modules. Also, we cannot use Expo build service to build and release our app.</p><p>Which one I chose? Both. I’m not using remote Expo build services, but for testing purposes it is convenient for me to use their Client. Expo has a workaround, that allows me to use proper version of Firebase SDK:</p><ul><li>When I run my app on Expo client, Firebase Web JS SDK is loaded</li><li>When I build it using bare react-native, Firebase native SDK is loaded</li></ul><h4>The Solution</h4><p>Fortunately, both Web and Mobile Firebase SDK has exactly same API for some modules (for example Firestore). This means we can write whole code once and it should work with both versions.</p><p>Expo <a href="https://docs.expo.io/versions/v36.0.0/bare/using-expo-client/">allows us</a> to create separate code files for client-specific fallbacks. Let’s create two files. One for native:</p><pre>//firebaseProvider.ts</pre><pre>console.log(&#39;Using Native Firestore Provider&#39;);</pre><pre>import firestoreNative from &#39;@react-native-firebase/firestore&#39;;<br><br>export default firestoreNative;</pre><p>and one with .expo appended to its filename:</p><blockquote><strong>Update</strong>: Note that since Expo SDK 41 the extension .expo.ts is no longer working. <a href="https://github.com/expo/fyi/blob/master/expo-extension-migration.md">More details here</a>.</blockquote><pre>//firebaseProvider.expo.ts</pre><pre>console.log(&#39;Expo - Using Node.js Firestore provider&#39;);<br>import * as firebase from &#39;firebase&#39;; import &#39;firebase/firestore&#39;;</pre><pre>const firebaseConfig = {<br>  &quot;apiKey&quot;: &quot;===&lt;&lt;&lt;YOUR_API_KEY&gt;&gt;&gt;===&quot;,<br>  &quot;authDomain&quot;: &quot;===&lt;&lt;&lt;PROJECT_ID&gt;&gt;&gt;===.firebaseapp.com&quot;,<br>  &quot;projectId&quot;: &quot;===&lt;&lt;&lt;PROJECT_ID&gt;&gt;&gt;===&quot;<br>};</pre><pre>firebase.initializeApp(firebaseConfig);<br>const db = firebase.firestore();<br>export default () =&gt; db;</pre><p>Now, we can use Firestore anywhere in our app:</p><pre>import firestore from &#39;./firebaseProvider&#39;;</pre><pre>//example usage<br>const items = await firestore().collection(&#39;items&#39;).get();</pre><p>Loader will automatically choose which file it should import. Of course we also need to have both Firebase SDKs installed (see their official docs for installation instructions).</p><p><strong>What with native-only Firebase modules?</strong><br>Expo still allows to disable them using simple if statements. Quick example:</p><pre>import analytics from &#39;@react-native-firebase/analytics&#39;;</pre><pre>//don&#39;t track screens for Expo Client - Firebase Web SDK <br>//doesn&#39;t support it<br>if (appConstants.appOwnership !== AppOwnership.Expo)<br>    analytics().setCurrentScreen(routeName, routeName);</pre><h4>Project creation and Android build hell</h4><p>You will probably encounter some problems, when trying to build Expo Bare app with Firebase on Android. They are caused by incompatible Gradle wrapper versions. Expo bare workflow uses react-native-unimodules which require older Gradle versions to build, and react-native-firebase works with newer Gradle versions. This may lead to frustrating build errors.</p><p>By trial and error method, I have it working for Gradle wrapper version 5.0. I do not guarantee that it will work for existing projects (so make your backup before doing anything), but I will explain how to create new project and configure it to work:</p><p>Used versions: Expo 36.0, Expo CLI: 3.13.8, React-Native: 0.61,</p><ol><li>Create new <strong>Bare Workflow</strong> expo project:</li></ol><pre>expo init &lt;&lt;your project name&gt;&gt;<br>---- then select Bare Workflow (with TypeScript if you prefer) ---</pre><p>2. After project generation, go into its directory and install Firebase dependencies (both web and native):</p><pre>cd &lt;&lt;your project name&gt;&gt;<br>yarn add @react-native-firebase/app @react-native-firebase/firestore @react-native-firebase/auth firebase</pre><pre>---- For mac/iOS only ----<br>cd ios &amp;&amp; pod install &amp;&amp; cd ..</pre><p>3. Modify Gradle configuration (generated one is corrupt).</p><ul><li>Go to android/build.gradle and replace:<br>task wrapper(type: <em>Wrapper</em>) with just wrapper</li><li>Go to android/gradle/wrapper/gradle-wrapper.properties and in distributionUrl replace version 4.10.1 (or any other) with 5.0</li><li>Check if it builds, run react-native run-android , react-native run-ios (mac only) and expo start .</li><li>Configure Firebase for your project (see Google and RN-Firebase docs)</li><li>Try to use solution above :)</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4772d449cb69" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>