Getting Started with React Native (and should I use it at all?)
-
Upload
devin-abbott -
Category
Engineering
-
view
339 -
download
0
Transcript of Getting Started with React Native (and should I use it at all?)
• Cross-platform
• Performant, native feel (with
some effort)
• Great developer experience
• Push updates over-the-air
• Strong community
• Backed by Facebook
Pros
• Early
• Unstable (bugs, APIs)
• Ecosystem not fully
developed
• Polished apps are high effort
• You may need native code
(so JS + Obj-C + Java)
Cons
• We know JS / React
• We have lots of web
developers but few mobile
• Our design is brand-focused
• We’re willing to invest in RN
• We want to get into OSS
• We want OTA code updates
Maybe we should use React Native
• We don’t know JS / React
• We already have an iOS
team and an Android team
• Our designs are heavily
platform-specific
• We don’t have the time or
money for an RN team / OSS
Or maybe we shouldn’t
Boilerplates
Ignite - 3,607 stars
Pepperoni App Kit - 2,975 stars
Snowflake - 2,885 stars
Create React Native App
• We want to start coding now
• Optimize for short term
• Large team starting today
• We don’t know how to setup
redux + navigation + …
• We don’t mind accruing a bit
of technical debt
Maybe we should use a boilerplate
• We want to spend a few
days learning foundations
• We have a small team
• We’re experienced with the
modern JS / React stack
• We want to choose exactly
the right libraries for our app
Or maybe we shouldn’t
Which navigation library should I use?
react-navigation*
*if you absolutely need native navigation: react-native-navigation
Should we use Flow?
I recommend no Flow to begin with
• Fewer things to learn • Less code to write • Tooling isn’t quite there • Can add incrementally later
Should we learn React JS before React Native?
Sort of
Typically "React JS" means React for the web. The web-specific stuff is not relevant (e.g. DOM elements and browser APIs). The React fundamentals are the same for web and mobile though (component lifecycle, etc), and you will need to learn those.
Can we re-use code between web and mobile?
Sort of
Certainly most of the non-React code can be re-used. If you want to literally write the same app for both web and mobile, there are two libraries to consider using: react-native-web and react-primitives. These both provide components that work on web and mobile. You could also just re-use a subset of your components that don’t render primitives (div, View)