Skip to content

Instantly share code, notes, and snippets.

@abdullin
Last active October 20, 2015 17:57
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save abdullin/77698c102d8824533540 to your computer and use it in GitHub Desktop.
Summary of React Native

React Native

Set of components to allow describing native widgets as React components and rendering them natively. It allows to wrap native APIs (imperative mutative) with declarative immutable APIs of React.

React Native replaces the DOM renderers with native renderers which allows people to render platform <View>/<ScrollView>/<NativeWhatever> instead of <div>/<span>. Other than that, you get to use the exact same React API that you already know (even down to the event bubbling). You can bridge to things that are only available on the platform, and can in general make higher performance granular building blocks that cannot be accomplished with web technology (such as components that decode images more efficiently or with different concurrency models). As with everything, JSX is not required to take advantage of this - and you can use any of the compile-to-js languages that you use with React today.

It includes:

  • JS engine on a background thread
  • Communicates via batched, async messaging protocol to a native (objc or android) server running on the main thread (basically create_view(), update_view(), destroy_view(), on_event() etc)
  • Plug-in for React that speaks that protocol
  • Tools to make cross-platform dev a bit easier (standard text component, cross-platform flexbox layout system)
  • Designed to take advantage of native platform views, NOT be the next Java Swing

Live samples

"A significant portion" of Facebook Groups app was built with React Native. More apps will be coming soon.

Platforms

Facebook is working on support for Android and iPhone. Windows (phone/desktop) and OSX were not mentioned.

Notes

React Native doesn't imply a single codebase. Write once run anywhere. Instead - learn writing once (tooling, principles, stack, IDE) and then be able write platform-specific app for the specific native platform.

References

This summary is based on the keynote video: http://www.youtube.com/watch?v=KVZ-P-ZI6W4 and some discussions on HackerNews

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment