Talk describing if you should integrate React Native into an existing native application. The talk includes a sample app with an example of architecture.
https://github.com/hgale/BrownFieldExample
14. Things to know Greenfield:
+ Javascript
+ How React works
+ How to use React Native
2.6
15. Things to know Brownfield:
+ Javascript
+ How React works
+ How to use React Native
2.7
16. Things to know Brownfield:
+ At least one native language
+ How that native platform’s APIs work
+ The platform’s ecosystem / toolchain
+ How the existing native codebase is architected
2.8
17. Why is Brownfield harder
than Greenfield?
+ Takes 1-3 months to learn a new platform
+ You potentially have 2 new platforms to learn
+ Any existing code base takes time to learn
+ You potentially have 2 new code bases to learn
2.9
18. Initially, a Brownfield integration is probably going
to be at least 2-3x as hard as a Greenfield app.
2.10
19. In other words, a Brownfield integration potentially
nullifies many of the advantages of React Native.
2.11
39. So, how do you pick the right
project for a Brownfield integration?
2.31
40. Expo Blog: Should we use React Native?
2.33
https://blog.expo.io/should-we-use-react-native-1465d8b607ac
41. “If you’re thinking of using React
Native for a few things like a
settings screen, an FAQ, or
something like an About page —
the kind of things where you would
often just stick in a WebView —
you’re likely to have good luck”
2.34
Charlie Cheever,
Co-Founder, Expo
42. “There are people who identify themselves
strongly as iOS or Android programmers &
have a really hard time being happy with
React Native. iOS programmers in
particular are very unhappy with it and
generally regard JS as an infestation of
the company’s codebase”
2.35
Charlie Cheever,
Co-Founder, Expo
43. UIKonf 2017 An iOS Developer’s take on React Native:
2.36
https://www.youtube.com/watch?v=cZ4zQWgajBg&t=232s
44. “Even if you’re using React
Native for things that it’s good at
and having success, it can still be
hard for large-scale native and
React Native development to
coexist in the same organization
for non-technical reasons.”
2.37
Charlie Cheever,
Co-Founder, Expo
45. If you want infrastructure to be widely adopted
its important to build trust in both you and the
infrastructure.
2.38
49. Case Study
+ Example based on integration done for one
of my clients, KeepSafe
+ Use React Native to power A/B tested
subscription up-sell screen
+ Use code push to ship new experiments
without submitting a new app to the app
store 3.1
51. + Display a particular up-sell experiment when a
user does something in the native app
+ Get a list of available experiment screens at
runtime
3.3
What does the example need to do?
54. + Need a way to Send and Receive events
between React Native and Native
+ Need a way to pass data in and out of React
Native
3.6
What does the integration need to do?
59. + React Native emits an event in Javascript with
an SKU
+ Events are strings defined in both Javascript and
Native
+ Native code has event handlers that hook into
the existing payment system (ApplePay, etc) 3.11
What happens when I click purchase?
61. + ListScreens, sends all screens from React
Native when app starts
+ DismissScreen, tells the native nav screen to
dismiss the React Native screen
+ PurchaseItem, tells native purchase system to
make a purchase with SKU 3.11
What events are being emitted?
78. + ReactNativeViewController.swift hosts React Native in
native code, starts with props based on config.js
+ index.js calls getScreen with passed in props, which
contain screen to display
+ Native code has event handlers that hook into the
existing native systems that handle ApplePay, nav, etc)3.29
What happens when React Native
displays a screen?
94. Artsy have an excellent series of posts on Brownfield
integration:
3.45
http://artsy.github.io/series/react-native-at-artsy/
https://github.com/artsy/emission
Artsy open sourced a collection of React Native
Components which they use in their app:
96. Supporting React Native at Pinterest by Vivian Qu:
3.47
https://medium.com/@Pinterest_Engineering/supporting-react-native-at-
pinterest-f8c2233f90e6
Leverage Your Android Knowledge To Boost Your Team’s Velocity With React
Native.
Presentation by Thorben Primke (Pinterest) at Droidcon
Berlin: