6. React.js: Basics
● Declarative Components
● Virtual DOM (Speed)
● One-way data binding ( VS
angular)
A JavaScript library for building user
interfaces
7. React.js: Components
● Components
○ Types
■ Stateless (props only)
■ Stateful (state)
○ render() function
○ Life-cycle
● Props
○ Allow arbitrary input to be passed to a component
○ User for parent-child communication
● State
○ Store data of component
8. React-Native
● Learn once, write anywhere (previous: write once, run anywhere)
○ Provide native experience
● Built on React.js
● Available for
○ Android: 4.1+
○ iOS: 8+
9. Why React-Native
● Faster development speed
● Lower cost of development
○ Code reuse
○ Easy to find developers
● Ship across multiple platform
● Over the Air (OTA) updates
17. Challenges in React-Native Development
● Frequent updates of React-Native
○ App should be updated regularly
● Third-party libraries can become outdated
react-native-git-upgrade
26. FAQ: Do I need to learn XCode/Android Studio
Answer: Yes
You need to know how to link native libraries. Fortunately, it is simple and
normally you just have to do as documented and you would be fine
27. FAQ: Do I have to write native code
Answer: No (Normally)
You would be writing code is Javascript. If there is some native functionality
that is not available, you have to write bridging code. React-Native provide
primitives to do so
28. FAQ: Do I have to rewrite my native app in RN
Answer: Yes
You can reuse parts of the native code by exposing it to react-native bridge.
Writing RN bridge requires knowledge of RN internals, as well as native (both
iOS and Android) code
29. FAQ: What backend should I use with RN
Answer: Any backend
You can user REST APIs or Firebase
Demo app have both REST APIs and Firebase
30. FAQ: Can you use my favorite JS library in RN
Answer: Yes (Probably)
You can use moment, lodash, axios and other pure Javascript libraries (that
don’t have a browser-specific component)
31. FAQ: How does React-Native help my startup
Answer: Best for early startup
● Make MVP quickly
● Over The Air (OTA) update help you modify the app without going through
the app-store process
32. FAQ: React-Native VS Ionic VS NativeScript
Answer: React-Native is performance focus. Uses Native UI
● https://stackshare.io/stackups/ionic-vs-nativescript-vs-react-native