<?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 Brandon Roberts on Medium]]></title>
        <description><![CDATA[Stories by Brandon Roberts on Medium]]></description>
        <link>https://medium.com/@brobertstech?source=rss-8adc031dae50------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4C2djQlfCTxrrOOQ3QoMxw.jpeg</url>
            <title>Stories by Brandon Roberts on Medium</title>
            <link>https://medium.com/@brobertstech?source=rss-8adc031dae50------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 03:11:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@brobertstech/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[A Mobile App In A Day: No Xcode or Android Studio]]></title>
            <link>https://medium.com/@brobertstech/a-mobile-app-in-a-day-no-xcode-or-android-studio-2feb8d306d80?source=rss-8adc031dae50------2</link>
            <guid isPermaLink="false">https://medium.com/p/2feb8d306d80</guid>
            <category><![CDATA[redux-saga]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[mobile-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Brandon Roberts]]></dc:creator>
            <pubDate>Tue, 06 Jun 2017 16:58:22 GMT</pubDate>
            <atom:updated>2017-06-06T16:58:22.177Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xDi2csEAWxu95IEkaNdFUQ.png" /></figure><p>This post is my initial experience writing a simple movie search app in a single day with React Native, Redux, Redux-Sagas, and Expo. There is a TL;DR at the end!</p><h3><strong>What I Wanted</strong></h3><p>Easy setup, familiar JavaScript language, extensible, and a fast development cycle.</p><h3><strong>What I Got</strong></h3><p>Easy setup, familiar JavaScript language, extensible, and a fast development cycle <em>with some quirks</em>.</p><h3><strong>React Native &amp; Exponent (Expo.io)</strong></h3><p>Expo is an open source project for building native iOS and Android apps in JavaScript (using React Native). With big players like FaceBook and AirBnB already using this in production, it will be worthwhile to check out.</p><p>Expo is a platform that allows you to open your app in development, share your app with coworkers as you make updates, and my personal favorite, build .ipa or .apk files without Xcode or Android Studio.</p><p>After the app is accepted to the app store, you can update it with XDE <em>without having to go through the app store.</em> You read that right. You don’t have to re-submit your app to the app store after the first time. I am excited to try this out. The chance to skip over a week of iOS app reviews sounds like a dream come true.</p><blockquote>“Push notifications, FaceBook login, camera, video, maps, and crash reporting are all available right out of the box.” -Developer At Exponent</blockquote><p>Getting set up with Exponent was pretty simple. You will need the Expo mobile app (for iOS or Android) and the desktop application called XDE. If you don’t have a suitable device you can set up, you will have to get an emulator. I set up Genymotion for Android fairly quickly, but mostly used my personal device for development. I won’t go into great detail here because the expo docs are great. If you want to use Expo read the Q<a href="https://docs.expo.io/versions/v17.0.0/index.html">uick Start Guide</a> first and then the <a href="https://docs.expo.io/versions/v17.0.0/guides/up-and-running.html">Up And Running</a> article. They are both extremely short and descriptive. That is all you will need if you want to get started.</p><p>After reading the previous two articles mentioned, I had a project up and running from the XDE desktop application. The desktop application XDE allows you to scan a QR code and have the application running on your phone in seconds. That took about 30 to 45 minutes to get going. In comparison, Xcode and Android Studio both took multiple hours to get installed and configured. Expo seems to just work <em>out of the box</em>.</p><h3>Design Of The Application</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/452/1*qum_o_Q7asqlKTwYI-OQNg.gif" /><figcaption>The app running on Android</figcaption></figure><p>As I started this app I wanted it to send requests to an outside API to fetch data and to be extensible for when I want to go past “day 1 development”. I decided to create an app to search for movies (which has never been done before, right!?) using the OMDB API. I also decided to use redux and redux-saga to manage the state. For small projects, Redux is a little overkill, but I like the paradigm and the structure it provides for managing app state. To keep state manageable, I normalized my reducer to hold the retrieved movies as is shown below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/10ba71ba57a23daf1bbd02cd62752420/href">https://medium.com/media/10ba71ba57a23daf1bbd02cd62752420/href</a></iframe><p>The redux structure is here to give some concept of what the app looked like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*KfRMQGSSVRWeZy8vyvWOhg.png" /><figcaption>Overall structure of the application (like many react-redux apps).</figcaption></figure><h3>Development Experience With Hot Reloading</h3><p>The Expo default project is set up for hot reloading with React Native. As you make changes to code, hot reloading injects changed modules into your live code without having to stop the application. I never got the chance to try hot reloading when I used Swift and Java, but I am extremely impressed it was so simple to use. One issue I ran into while using hot reloading was that if I did not reload the code within 15 minutes the phone would lose connection with the XDE desktop application. Not much of a big deal when there are so many wins to be had here.</p><p>Another huge win with React Native is that the styles are directly coupled with the React component itself. This is an awesome pairing because making a style change in the component gets hot reloaded instantly on your app without having to recompile the entire application. One downside of this scenario is it makes it more difficult to overwrite styling from outside modules.</p><h3>The Poor Fate of Debugging</h3><p>Debugging mobile apps can be tough. I found debugging the layout was difficult because there was no good way (that I found) to inspect the React Native “DOM”. As a web dev at heart, I found myself looking for a DOM inspector like the Chrome Dev Tools. The only option is to use a command on the phone/emulator to inspect the UI elements. It is difficult to see the UI tree in all of it’s glory on a mobile device while also trying to interact with the page. Alas, I was left wanting.</p><p>Debugging network requests was also difficult. Again, I wanted something like the network tab in Chrome Dev Tools. Getting network debugging took some extra configuration. Here is a <a href="https://stackoverflow.com/questions/33997443/how-can-i-view-network-requests-for-debugging-in-react-native">StackOverflow</a> for the curious. I never got it working properly, but I think this is a definite must-have for future development.</p><h3>Gesture Responder System (GRS)</h3><p>One critical piece of React Native, that could appear as a quirk is the GRS. The GRS solves the question: “If two components want to be the responder to an event, who gets control?” React Native answers this in the same way that the regular JS does with the DOM. There is a “capturing”, and “bubbling” phase to determine what component should respond (handle) the gesture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*GoGd-DfV_enZzQ-qxVpgUA.png" /><figcaption>Button is the first responder</figcaption></figure><p>Normally, the deepest level node is the first responder and handles the touch. This works well because it ensures the user can still interact with deepest level components. The capturing phase allows a parent to steal responder status instead of the child receiving control. This is useful if a parent knows it will need to be the responder instead of a lower level component.</p><p>This initially tripped me up with React Native, in the case when a button needed to be tapped twice in order to perform an action. The button itself was not the first responder like I expected it to be. It turns out, the first tap was dismissing the keyboard (first responder) and the second tap executed the query. The solution to this was to always persist the keyboard (thus allowing the button to become the responder). Then I manually dismissed the keyboard and executed the query together when the button was clicked. This may not be an ideal solution but it worked to keep me going on day 1!</p><h3><strong>TL;DR</strong></h3><p><strong>Pros</strong>: Expo and React Native are extremely easy to set up. Hot reloading is a life saver. Not having to re-submit my app through the app store sounds like a huge win. All the perks of React auto page updates with styling paired with the component itself makes life simple. Redux is almost always a win in my book.</p><p><strong>Cons</strong>: Debugging was difficult for inspecting the React Native “DOM” and for inspecting network requests (I didn’t find great ways of doing either of these). Like any abstraction on top of lower level components, there are places where the developer loses dev power (navigation bar was difficult to specialize).</p><h4><strong>BONUS: Demoing With Appetize.io</strong></h4><p>Appetize.io allows you to run native mobile apps in the browser. I found this was fairly easy to get going. Check it out if you use React Native and want to demo your work on a webpage!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2feb8d306d80" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>