facebook Clutch Top custom software development companies

React Native for iOS Developers

React Native for iOS Developers
Average rating: 0
(0 votes)

Thanks! You’ve rated this material!

Read this beautiful material Intro to React Native for an iOS Developer. Why you should? React Native makes it feasible to share a lot of code between iOS, Android and Web. It is not a panacea for making a cross-platform app though but we will point some main reasons why React Native for iOS developers can be considered as one of the options.

The scope of the original 45-minutes-to-read article is here.

To make a developer experience as fast as the web developer’s you need to really reflect on how slow native development is. A change in one part of the app requires a full restart of the simulator, and for the developer to get back into the same position to see the changes. As a web developer you would just refresh the browser. For example with the simplest Xcode iOS app template. Even 9 seconds per change leaves a lot of time to lose focus, and discourages playfulness.

React was built for the web – but some people realized that they could de-couple the React component tree from the HTML output, and instead that could be a tree of UIView’s. That is the core idea of React Native. Bridge the React component tree to native primitives. React Native runs on a lot of platforms:

  • Officially: iOS, Android, tvOS & VR
  • Unofficially: macOS, Windows & Ubuntu

Each of these platforms will have their own way of showing some text e.g.

  • RCTText for iOS and tvOS – which uses NSTextStorage, and drawRect
  • Textfield for Android – which uses Canvas and a DrawCommand
  • Three.js view primitive for VR – which uses BitmapFontGeometry + Shaders
  • RCTText for macOS which also uses NSTextStorage, and drawRect
  • ReactTextShadowNode for Windows – which uses a RichTextBlock
  • QQuickItem for Ubuntu – Which uses QString to render

But when working at React-level, you would use the component Text. This means you work at a “React in JS” level, and rely on the primitives provided by each implementation of React Native.

For iOS, this works by using a JavaScript runtime which sends messages across a bridge that handles the native UIView hierarchy. Most of the messaging work is handled inside the RCTUIManager which receives calls like createView:viewName:rootTag:props: , setChildren:reactTags: , updateView:viewName:props: and createAnimatedNode:config.

Like any cross-platform abstraction, React Native can be leaky. To write a cross-platform app that purely lives inside JS Runtime, you have to write React-only code. React and React Native doesn’t have ways to handle primitives like UINavigationController – they want your entire app to be represented as a series of components that can be mapped across many platforms.

Author says if you’re considering a new app, or a grand re-write React Native should be considered as one of your options. It can help you be cross-platform on mobile, but also cross-platform with the web.

In the original article you will find next information:

  1. Handling “State” Changes and View Management
  2. More about core idea of React Native
  3. Trying out React guide
  4. Writing JavaScript
  5. Two main environments for writing JavaScript in the browser, and inside Node
  6. JS tooling, testing and deployment
  7. Doing it right per platform
  8. Animation
  9. Long-term aspects of React Native and performance
  10. Dependencies
  11. Places where React Native hasn’t fit for us
  12. When to choose
  13. Integrating in the existing app

A lot of, huh? But this in-detailed material is worth to spend your time with, believe us.

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

*By submitting this form you agree with our Privacy Policy.

Mailing & Legal Address

Syndicode Inc. 340 S Lemon Ave #3299, Walnut CA, 91789, USA

Visiting & Headquarters address
Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
Email info@syndicode.com
Phone (+1) 9035021111