<?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 Eli Bucher on Medium]]></title>
        <description><![CDATA[Stories by Eli Bucher on Medium]]></description>
        <link>https://medium.com/@buchereli?source=rss-67f9082fca0b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*z84cK7UUQrjTfrJKGiaz5w.png</url>
            <title>Stories by Eli Bucher on Medium</title>
            <link>https://medium.com/@buchereli?source=rss-67f9082fca0b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 14:08:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@buchereli/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[Dealing with Long COVID-19 Review Times — React Native Code Push]]></title>
            <link>https://medium.com/@buchereli/dealing-with-long-covid-19-review-times-react-native-code-push-daccff43f9fb?source=rss-67f9082fca0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/daccff43f9fb</guid>
            <category><![CDATA[app-store]]></category>
            <category><![CDATA[play-store]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[code-push]]></category>
            <category><![CDATA[app-review]]></category>
            <dc:creator><![CDATA[Eli Bucher]]></dc:creator>
            <pubDate>Fri, 03 Apr 2020 16:36:13 GMT</pubDate>
            <atom:updated>2020-04-03T16:36:13.257Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dealing with Long COVID-19 Review Times — React Native Code Push</h3><p><em>Decrease your users exposure to crashes, fix bugs faster and push updates sooner.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*8MCg3uNJ9CwwX8CkEohCkA.png" /></figure><p>As the quartentines caused by COVID-19 started to effect more and more countries this message appeared on google plays app console. As an app developer or business owner this is a pretty terrifying message. What if there is a serious crash or bug? Will it take a week OR MORE for the hotfix to be released? Ahhhh 😨</p><p>Anecdotally, the first release I made after seeing this message took hours to go out, the second took a day and the latest took more than three days to be released. A week or longer review times seem like they’re just around the corner.</p><h3>The Solution — Code Push</h3><p><a href="https://docs.microsoft.com/en-us/appcenter/distribution/codepush/react-native">Official Documentation</a></p><p><strong>Code push is a Microsoft SDK for React Native and Cordova which allows the Javascript portion of an app to be updated without going through the store review process.</strong> This allows you to make quick changes to your app which is beneficial when you need to fix crashes, run AB tests or surveys, make UI tweaks and more.</p><p>Rather than draft a release for review on an app store you simply push the updated Javascript code to your Microsoft Code Push Server. When the user opens the app it will check with your server to see if there is an update and downloads it in the background.</p><h4>Two important limitations of code push:</h4><ol><li>You can only update the Javascript portion of the app i.e. modifications to .java or .m files will still have to go through the app store</li><li>Apple allows code push but does not allow for major changes to the app to be made through code push</li></ol><h3>Implementing Code Push</h3><h4>Create an AppCenter Account</h4><p>Go to <a href="https://appcenter.ms/">appcenter.ms/</a> and hit get started to create an AppCenter account</p><h4>AppCenter CLI</h4><ol><li>Run yarn global add appcenter-cli to install the global npm package</li><li>Run appcenter login which should open a new tab on your browser. Copy the access code and paste it into your console</li><li>Run appcenter apps create -d YOUR_APP_NAME -o Android -p React-Native<br>This will create a new app on AppCenter. Replace Android with iOS to add an iOS app</li></ol><h4>Adding Code Push to Your App</h4><p>In your app directory run yarn add react-native-code-push</p><p>Then follow the official documentation which covers how to add code push for different versions of React Native: <a href="https://docs.microsoft.com/en-us/appcenter/distribution/codepush/react-native#android-setup">Android</a> &amp; <a href="https://docs.microsoft.com/en-us/appcenter/distribution/codepush/react-native#ios-setup">iOS</a> setup guides.</p><p>Don’t forget about setting up staging and production (<a href="https://docs.microsoft.com/en-us/appcenter/distribution/codepush/react-native#multi-deployment-testing">guide</a>).</p><p><strong>To get your deployment keys from AppCenter:</strong></p><ol><li>Select Distribute in the left hand menu</li><li>Select Code Push in the sub menu</li><li>Select the wrench in the top right corner</li></ol><p>Finally change your main App.js or App.ts file so that you wrap your root component with the codePush higher-order component:</p><pre>import codePush from &#39;react-native-code-push&#39;;</pre><pre>...</pre><pre>class App extends Component { ... }</pre><pre>const codePushOptions = {<br>   checkFrequency: codePush.CheckFrequency.ON_APP_START,<br>};</pre><pre>export default codePush(codePushOptions)(App);</pre><p>codePushOptions.checkFrequency is how often you want to check for updates. The options are ON_APP_STARTwhich is app launch and ON_APP_RESUME which will check for updates every time your app in resumed.</p><h4>Creating Your First Release</h4><p>To create a release on app center run:<br>appcenter codepush release-react -a OWNER-NAME/APP-NAME -d DEPLOYMENT-NAME</p><p>OWNER-NAME: when you view your app on AppCenter look at the URL in between “users/OWNER-NAME/apps” is the correct owner name<br>APP-NAME: the app name is also listed in the URL following “apps/APP-NAME”<br>DEPLOYMENT-NAME: either Production or Staging</p><h3>Some Questions I Had While Learning</h3><h4>Q: I can’t find the option to perform a rollback on the dashboard!?</h4><p>A: AFAIK there is no option on the dashboard to force a rollback you must do this using the command line: <br>appcenter codepush rollback OWNER-NAME/APP-NAME DEPLOYMENT-NAME</p><p>This will rollback to the last version before the current one. You can rollback to specific release using--target-release v1. Rollbacks create a new release with a new highest version number but use the target hash.</p><h4>Q: After creating a rollback I am not seeing any rollbacks recorded on the dashboard is something broken?</h4><p>The rollback count on the dashboard is referring to client-side automatic crash rollbacks. A manually created rollback is just a new release with an old tag.</p><h4>Q: My update isn’t applying until the app is opened twice?</h4><p>A: When the app launches it asks appcenter if there is an update. The app continues to launch regardless of whether there is an update. If there is a new version to be downloaded it does so in the background. This update is not applied until the app is closed and launched again. Using the mandatory flag will force the app to restart after downloading the update.</p><p>You can modify your code push options to update and install on app resumes rather than launches:</p><pre>codePushOptions = { <br>   checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,<br>   installMode: codePush.InstallMode.ON_NEXT_RESUME,<br>}</pre><h4>Q: What does a “mandatory” release mean?</h4><p>A: Mandatory is an optional flag you can attach when creating a release using -m or manually update in the AppCenter dashboard. The mandatory flag will cause the app to restart immediately after downloading the update causing it to be applied immediately rather than on the next launch or resume.</p><p><strong><em>Warning:</em></strong><em> this is intrusive and will cause the app to relaunch suddenly. For example: user opens app → code push triggers download → user goes to login screen and starts logining in → code push updates and triggers refresh → user is forced to re-enter information. Checkout </em><a href="https://medium.com/fundbox-engineering/the-right-way-to-code-push-react-native-cba82d0f8ec9"><em>this article</em></a><em> for information on handling this case and other more high level Code Push information.</em></p><h4>Q: What’s the deal with “codePush.notifyAppReady”?</h4><p>Here’s what the docs say:</p><blockquote>Notifies the CodePush runtime that a freshly installed update should be considered successful, and therefore, an automatic client-side rollback isn’t necessary. <strong>It is mandatory to call this function somewhere in the code of the updated bundle</strong>. Otherwise, when the app next restarts, the CodePush runtime will assume that the installed update has failed and roll back to the previous version. This behavior exists to help ensure that your end users aren’t blocked by a broken update.</blockquote><p>Code Push has a feature built in that does an automatic client side rollback in the event of a crash. This blurb makes it sound like your app will automatically be rolled back if you don’t call the notifyAppReady method!</p><p>This is pretty important so why is it buried in the API reference section of the docs and not mentioned higher up? I’m pretty sure this method is deprecated. I have not seen unexpected rollbacks in any of my testing. The author of <a href="https://github.com/Microsoft/react-native-code-push/issues/1576">this issue</a> on github came to the same conclusion. I don’t think you need to include this method, I am looking for a more official answer to this question and will update the article when I find it.</p><p><strong>These questions and more can be answered with the </strong><a href="https://docs.microsoft.com/en-us/appcenter/distribution/codepush/react-native#api-reference"><strong>API reference</strong></a><strong> which is super well documented. </strong>Hats off to Microsoft for such a awesome and well maintained tool.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=daccff43f9fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No Work Experience — How I Started Working Remotely as a Mobile Dev]]></title>
            <link>https://medium.com/@buchereli/how-to-get-started-in-remote-work-for-mobile-developers-no-experience-necessary-1a88b54d9d5b?source=rss-67f9082fca0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a88b54d9d5b</guid>
            <category><![CDATA[remote-working]]></category>
            <category><![CDATA[first-job]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[ios-development]]></category>
            <dc:creator><![CDATA[Eli Bucher]]></dc:creator>
            <pubDate>Wed, 25 Mar 2020 16:40:53 GMT</pubDate>
            <atom:updated>2020-03-28T16:23:08.816Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aUDZle1dL45rYYZf3mmmWg.jpeg" /></figure><h3>No Experience Necessary — How to get started in remote work for mobile developers</h3><p><em>I currently spend my time traveling the world skiing and climbing. USA, Canada, Japan, Spain, Germany, France, Greece and Madagascar all in the past 12 months; All while working a job I love.</em></p><h4>Getting My First Job</h4><p>When I started looking for my first job in mobile development here was my resume:</p><ul><li>High school Junior (16 years old)</li><li>No formal Computer Science education</li><li>No app released only a few completed small side projects</li><li>Currently in school so need flexible hours</li><li>Looking to learn about Android dev on the job</li></ul><p><strong>If I had gone to a recruiter with these requirements and skills they would have laughed at me. I needed a way to make myself appealing to businesses.</strong></p><p>I wanted to make an Android app so I went to Apple App Store and looked for popular games that I thought I was capable of making and did not have an Android version.</p><p>I found an Anagram game with nice graphics, decent game play and thousands of reviews and downloads. I sent an email to the developers explaining the follow:</p><ul><li>I am an Android developer</li><li>I love your app and would like to develop it for Android</li><li>A video of a simple Android mockup of the game to prove I could develop the mechanics</li><li>All you have to give me is the app assets (image files) and a portion of the future revenue</li></ul><p>For the company there are only two scenarios if they hire me:</p><p>A. I fail to make the app. All they have lost is the half an hour it took to send me the graphics.<br>B. I succeed and they essentially get a free Android version of their app minus the revenue share.</p><p><strong>I made the downside to hiring me non-existent while also adding a lot of potential value.</strong> When you look at things this way it’s really not surprising that they agreed to my proposal even with my terrible resume and demanding requirements for flexible remote work.</p><h3>Results</h3><p>I learned so much from making this app. I got professional app development experience and remote work experience. I had no mentor or formal education so my code was terrible but it worked. <strong>I learned to do everything from the first lines to releasing on the play store.</strong></p><p>The entire time I was motivated by the fact that the iOS version had 1000’s of installs and reviews. I was pretty sure this meant the Android version would be successful as well.</p><p>After releasing to the store it was slow growth but eventually we got on some top charts and ended up <strong>getting a few million game plays</strong> over the coming years. Although there were paid upgrade options and ads in the app I never made tons of money from the app even though it was popular.</p><p><strong>After this I had the most amazing portfolio piece. A completed and released app that I developed by myself with 1000’s of good reviews.</strong> I was easily able to get tech internships while still in highschool where everyone else was in college or recent college grad.</p><h3>TL;DR</h3><p><strong>I believe anyone wanting to get their foot in the door and start working as a mobile developer could follow my formula</strong>:</p><ul><li>Find a semi popular app only available on one store</li><li>Program a simple mockup of the app to prove competency</li><li>Contact company, show them the mockup and offer to make the app for revenue share</li><li>Make and release the app</li></ul><p>You probably won’t get rich from this app but I guarantee you will learn a ton and open up so many opportunities in the future.</p><p><em>If you found this interesting and want to hear more about my non-traditional career development, let me know.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a88b54d9d5b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HOW TO: React Native Date Picker]]></title>
            <link>https://medium.com/@buchereli/how-to-react-native-date-picker-872c600af41b?source=rss-67f9082fca0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/872c600af41b</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[react-native-component]]></category>
            <category><![CDATA[date]]></category>
            <category><![CDATA[datepicker]]></category>
            <dc:creator><![CDATA[Eli Bucher]]></dc:creator>
            <pubDate>Thu, 14 Nov 2019 06:32:03 GMT</pubDate>
            <atom:updated>2019-11-17T05:26:50.033Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://github.com/react-native-community"><em>React Native Community</em></a><em> has a date and time picker for Android and iOS. This component replaces and merges the now deprecated </em><em>DatePickerIOS, </em><em>TimePickerAndroid and </em><em>DatePickerAndroid.</em></p><p>In this article I will explain how to use DateTimePicker and how to fix a major UI issue it presents when trying to keep consistant UI across Android and iOS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jlsO2Vno0y0a9qSPJ3gxzQ.jpeg" /></figure><h3>Install</h3><p>Install with npm using:</p><pre>npm install @react-native-community/datetimepicker --save<br>cd ios<br>pod update</pre><p>Android should auto link if you are using RN v60+</p><h3>Display</h3><p>Displaying a Date Picker is pretty straight forward:</p><pre>import React, { Component } from &#39;react&#39;;<br>import DateTimePicker from &#39;@react-native-community/datetimepicker&#39;;<br><br>export default class App extends Component {<br>  state = {<br>    date: new Date(),<br>  }<br><br>  render() {<br>    const { date } = this.state;<br><br>    return (<br>      &lt;DateTimePicker <br>        value={ date }<br>        mode=&#39;default&#39;<br>        display=&#39;default&#39;<br>        onChange={ date =&gt; this.setState({ date }) } /&gt;<br>    );<br>  }<br>}</pre><p>You can find more information about the props in the <a href="https://github.com/react-native-community/react-native-datetimepicker#react-native-datetimepicker">docs</a>.</p><h3>Issue</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*-eOSMcdYtmEhnoNPapcTZw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*lnUeqNBbUQhsfi7besdDVQ.png" /><figcaption>Date Pickers</figcaption></figure><p>The main problem I have with this DatePicker is that Android opens a modal while iOS displays a large scroll wheel (as shown above). This is a drastic difference in UI that needs to be handled. To address this, I made a custom DatePicker component that opens the iOS DatePicker as a modal (shown below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*fxfKz_0omeMl6g8R62j5HQ.png" /><figcaption>iOS Modal</figcaption></figure><p>I’m using <a href="https://www.styled-components.com/">styled-components</a> instead of a style sheet.</p><pre>import React from &#39;react&#39;;<br>import { TouchableOpacity, Platform, Text } from &#39;react-native&#39;;<br>import styled from &#39;styled-components&#39;;<br>import DateTimePicker from &#39;@react-native-community/datetimepicker&#39;;</pre><pre>const Container = styled.TouchableOpacity`<br>  background-color: ${Platform.OS === &#39;ios&#39; ? &#39;#00000066&#39; : &#39;transparent&#39;};<br>  position: absolute;<br>  justify-content: flex-end;<br>  width: 100%;<br>  height: 100%;<br>`;</pre><pre>const Header = styled.View`<br>  width: 100%;<br>  padding: 16px;<br>  justify-content: flex-end;<br>  align-items: flex-end;<br>  background-color: white;<br>  border-bottom-width: 1;<br>  border-color: grey;<br>`;</pre><pre>export default class DatePicker <em>extends</em> React.Component {<br>  constructor(props) {<br>    super(props);<br>    <br>    this.state = {<br>      date: new Date(this.props.date),<br>    };<br>  }<br>  <br>  render() {<br>    const { onClose, onChange } = this.props;<br>    const { date } = this.state;</pre><pre>    return (<br>      &lt;Container <em>onPress</em>={onClose}&gt;<br>        {Platform.OS === &#39;ios&#39; &amp;&amp; (<br>          &lt;Header&gt;<br>            &lt;TouchableOpacity <em>onPress</em>={onClose}&gt;<br>              &lt;Text&gt;Done&lt;/Text&gt;<br>            &lt;/TouchableOpacity&gt;<br>          &lt;/Header&gt;<br>        )}</pre><pre>        &lt;DateTimePicker<br>          <em>value</em>={date}<br>          <em>mode</em>=&quot;date&quot;<br>          <em>display</em>=&quot;default&quot;<br>          <em>onChange</em>={(e, d) =&gt; {<br>            if (Platform.OS === &#39;ios&#39;) {<br>              this.setState({ date: d });<br>              onChange(d);<br>            } else {<br>              onClose(d);<br>            }<br>         }}<br>         <em>style</em>={{ backgroundColor: &#39;white&#39; }}<br>       /&gt;<br>     &lt;/Container&gt;<br>   );<br>  }<br>}</pre><p>Let’s break down what’s going on here.</p><pre>  {Platform.OS === &#39;ios&#39; &amp;&amp; (<br>    &lt;Header&gt;<br>      &lt;TouchableOpacity <em>onPress</em>={onClose}&gt;<br>        &lt;Text&gt;Done&lt;/Text&gt;<br>      &lt;/TouchableOpacity&gt;<br>    &lt;/Header&gt;<br>  )}</pre><p>This block displays a header bar on top of the iOS DatePicker. It gives the user a clear way to dismiss the modal but it is not needed for Android.</p><p>This component takes in three props:</p><p>date: this is the initial date the picker will start on<br>onChange: this method is not required but allows you to respond to date changes. This is iOS only because DateTimePicker only fires an onChange event for Android when the user selects done or cancel. <br>onClose: this method is called when the modal is closed with the chosen date or undefined if canceled</p><p>You can use this component in one of your screen like:</p><pre>{this.state.showDatePicker &amp;&amp; (<br>  &lt;DatePicker<br>    <em>date</em>={this.state.date}<br>    <em>onClose</em>={date =&gt; {<br>      if (date &amp;&amp; Platform.OS !== &#39;iOS&#39;) {<br>        this.setState({ showDatePicker: false, date: moment(date) });<br>      } else {<br>        this.setState({ showDatePicker: false });<br>      }<br>    }}<br>    <em>onChange</em>={d =&gt; {<br>      this.setState({ date: moment(d) });<br>    }}<br>  /&gt;<br>)}</pre><p>showDatePicker state should be set to true when the user selects a your date component which using date state to display the selected date.</p><p>You can further customize the DatePicker component to fit your specific requirements or include a time picker.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=872c600af41b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native — How to Load, Cache and Render Images from URLs (Remote Assets)]]></title>
            <link>https://medium.com/@buchereli/react-native-how-to-load-cache-and-render-images-from-urls-remote-assets-11f6edf28a6?source=rss-67f9082fca0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/11f6edf28a6</guid>
            <category><![CDATA[react-native-fast-image]]></category>
            <category><![CDATA[react-native-development]]></category>
            <category><![CDATA[cache]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[image]]></category>
            <dc:creator><![CDATA[Eli Bucher]]></dc:creator>
            <pubDate>Tue, 08 Oct 2019 17:19:00 GMT</pubDate>
            <atom:updated>2019-10-08T17:19:00.302Z</atom:updated>
            <content:encoded><![CDATA[<h3>React Native — How to Load, Cache and Render Images from URLs (Remote Assets)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TjymyAV5tlFDOrLo4jYQWw.png" /></figure><p><em>tl;dr use </em><em>react-native-fast-image for better performance when loading remote assets</em></p><p>To use the React Native Image component to load remote assets simply provide the source prop with a uri pointing at your remote asset:</p><pre>&lt;Image&gt;<br>   source={{ uri: &#39;<a href="https://facebook.github.io/react-native/img/tiny_logo.png&#39;">https://google.com/image.png&#39;</a> }}<br>&lt;/Image&gt;</pre><h3>The Problem</h3><p>This image component should do some image caching if there are proper image cache headers but there are a number of issues that I and many others have experienced when using Image.</p><ul><li>Flickering — Image loads and flashes for a millisecond then goes transparent before appearing again</li><li>Bad caching or no caching at all</li><li>Overall poor performance</li></ul><h3>The Solution</h3><p>A npm library created by Dylan Vann called <a href="https://github.com/DylanVann/react-native-fast-image">react-native-fast-image</a> solves most of these annoying issues. When implemented into my project which requires lots of remote asset loading, it was able to noticeably improve image load times (literally seems instantaneous after an image has been cached) and fix the annoying flicker issue.</p><p>Caching not only reduces load times but also means your app will use less of your users mobile data.</p><h3>Implementation</h3><p>Add the package with npm i react-native-fast-image</p><pre>&lt;FastImage<br>  style={styles.image}<br>  source={{<br>   uri: &#39;<a href="https://facebook.github.io/react-native/img/tiny_logo.png&#39;">https://google.com/image.png&#39;</a>,<br>  }}<br>/&gt;</pre><p>Information about resizeMode, priority and lots of other props can be found on the <a href="https://github.com/DylanVann/react-native-fast-image">github page</a> for react-native-fast-image.</p><h4>Loading Indicator</h4><p>You can use the onLoadStart and onLoadEnd props to manage your loading indicator. For example:</p><pre>&lt;FastImage<br>  style={styles.image}<br>  source={{<br>   uri: &#39;<a href="https://facebook.github.io/react-native/img/tiny_logo.png&#39;">https://google.com/image.png&#39;</a>,<br>  }}<br>  onLoadStart={() =&gt; { this.setState({ loading: true })} }<br>  onLoadEnd={() =&gt; { this.setState({ loading: false })} }<br>&gt;<br>  &lt;ActivityIndicator <em>animating</em>={ this.state.loading } /&gt;<br>&lt;/FastImage&gt;</pre><h4>Auto Height</h4><p>With remote assets sometime you’ll want to display the entire image but don’t know the aspect ratio of the image you are fetching. In this case you can use the onLoad prop to calculate the height, for example:</p><pre>&lt;FastImage<br>  style={{width, height: this.state.height}}<br>  source={{<br>   uri: &#39;<a href="https://facebook.github.io/react-native/img/tiny_logo.png&#39;">https://google.com/image.png&#39;</a>,<br>  }}<br>  <em>onLoad</em>={<br>    (evt) =&gt; {<br>      this.setState({<br>        height: evt.nativeEvent.height/evt.nativeEvent.width*width,<br>      });<br>    }<br>  }<br>/&gt;</pre><p>Width may be set to a fixed value or a percent of the device width. It’s simple to modify this to fix the height and use auto width if you needed to.</p><h4>Blur</h4><p>React Native Image makes adding blur to your images a breeze with blurRadius, unfortunately FastImage does not support blur. If blurring is essential to your application and you want to use FastImage you’ll need to use another library like react-native-blur to add a blur component on top of your image.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11f6edf28a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Performant Custom Map Markers for React-Native-Maps]]></title>
            <link>https://itnext.io/performant-custom-map-markers-for-react-native-maps-ddc8d5a1eeb0?source=rss-67f9082fca0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ddc8d5a1eeb0</guid>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[google-map-marker]]></category>
            <category><![CDATA[google-maps]]></category>
            <category><![CDATA[react-native-maps]]></category>
            <category><![CDATA[performance]]></category>
            <dc:creator><![CDATA[Eli Bucher]]></dc:creator>
            <pubDate>Thu, 08 Aug 2019 15:52:19 GMT</pubDate>
            <atom:updated>2020-03-28T16:23:24.287Z</atom:updated>
            <content:encoded><![CDATA[<p><em>tl;dr — use the marker prop </em><em>tracksViewChanges to control when markers are re-rendered by setting it to </em><em>false after your custom marker loads.</em></p><h3>Adding a Custom Marker</h3><pre>&lt;Marker<br>    coordinate={marker.coordinate}<br>&gt;<br>    &lt;CustomMarkerComponent /&gt;<br>&lt;/Marker&gt;</pre><p>The typical way to do this is to simply wrap your custom marker component or &lt;Image/&gt; in the &lt;Marker&gt; tags. This works okay until you have multiple markers. Even adding 10 custom markers to the map like this can cause serious performance issues with the map rendering.</p><h3>The Problem</h3><p>The root of the problem, as with almost all React Native performance issues, is a large number of unnecessary re-renders. Every time the map updates all of the custom markers are rendered which is quite inefficient as marker pins typically don’t change (image and coordinates).</p><h3>Improving Performance</h3><p>To fix this we will tell the map exactly when to track view changes to the marker pins. We do this using the tracksViewChanges prop on the marker.</p><pre>import React, { PureComponent } from &#39;react&#39;;<br>import { Image } from &#39;react-native&#39;;<br>import { Marker } from &#39;react-native-maps&#39;;</pre><pre>export default class CustomMarker <em>extends</em> PureComponent {</pre><pre>  constructor() {<br>    super();<br>    this.state = {<br>      tracksViewChanges: true,<br>    };<br>  }</pre><pre>  stopTrackingViewChanges = () =&gt; {<br>    this.setState(() =&gt; ({<br>      tracksViewChanges: false,<br>    }));<br>  }</pre><pre>  render() {<br>    const { tracksViewChanges } = this.state;<br>    const { marker } = this.props;</pre><pre>  return (<br>      &lt;Marker<br>        coordinate={marker.coordinate}<br>        tracksViewChanges={tracksViewChanges}<br>      &gt;<br>        &lt;Image<br>          onLoad={this.stopTrackingViewChanges}<br>          fadeDuration={0}<br>        /&gt;<br>      &lt;/Marker&gt;<br>    );<br>  }<br>}</pre><p>Let break down what’s happening here:</p><p>1. We initialize with tracksViewChanges = true so when the custom marker image loads it will render.<br>2. onLoad of the image we set trackViewChanges = false so we don’t needlessly re-render the custom marker.<br>3. We should set the fadeDuration = 0 otherwise the image may get stuck only partially faded in when the marker stops tracking the view changes.</p><p>Using this component you can adds lots of pins without slowing down your app.</p><p>But remember the marker is not tracking changes after the initial image load. This means that <strong>updates to your markers will not trigger rerenders</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7DEWkm_3CYi9_RHhSRqQxg.png" /></figure><p>It is not possible to create a an effect like this where a single markers image is updated based on the carousels position unless we handle prop changes.</p><h3>Handling Prop Changes</h3><p>All you have to do is add this componentWillRecieveProps logic and implement the shouldUpdate method with your own implementation:</p><pre>  componentWillReceiveProps(nextProps) {<br>    if (this.shouldUpdate(nextProps)) {<br>      this.setState(() =&gt; ({<br>        tracksViewChanges: true,<br>      }));<br>    }<br>  }</pre><pre>  shouldUpdate = (nextProps) =&gt; { //TODO implement }</pre><p>The map pins will now update dynamically without sacrificing performance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ddc8d5a1eeb0" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/performant-custom-map-markers-for-react-native-maps-ddc8d5a1eeb0">Performant Custom Map Markers for React-Native-Maps</a> was originally published in <a href="https://itnext.io/">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>