1. React
  2. Chain React
  3. 2017
  4. When to go Native Over Javascript

When to go Native Over Javascript

Harry Tormey at Chain React 2017

React Native is great for writing cross platform apps. Certain use-cases, however, still require native code. Together we will look at how to evaluate when native code is the better choice. I’ll cover strategies for dealing with performance issues and how to handle background tasks like geolocation. The promise of writing an app in Javascript for iOS and having it “just work” out of the box on Android is a tempting one. That along with hot reloading and the ability to push over the air updates to published apps make React Native a tempting proposition, especially for web developers who are unfamiliar with native development and want to leverage their knowledge of React. However certain use-cases still require native code. Together we will take a look at some of these exceptions and how to evaluate when native code is the better choice out of necessity or performance concerns. This talk will be from the perspective of an experienced iOS developer who has been working with React Native and has shipped several cross platform apps with native components. Things I will talk about: - Overview of how React Native works - Overview of iOS/Android application states and how that effects your apps design - App use-cases that require native code - Example app with native code that uses geolocation in the background (code available on github) - How to use native tools to profile your app (with example app, available on github) - Strategies for dealing with performance issues - Cooking demo where I port a Javascript component to Native and show differences in performance (code available on github)