TRACY LEE | @ladyleet
SPEAKER & GOOGLE DEVELOPER EXPERT
DEV - ANGULAR, EMBER, REACT, RXJS
TECH WRITER & PODCASTER
THIS DOT MEDIA / LABS
MENTOR
React + React Native + Native
React Native is not ALL JavaScript
React Native is not ALL JavaScript
React Native is powerful because we have a JavaScript
interface for code implemented natively.
A PRACTICAL APPROACH
TO REACT NATIVE
OUR AGENDA
1.
@ladyleet
2. Building an app
4. Navigation
5. React Native Ecosystem
React Native Components
3. Styling
@ladyleet
React Native Components
Basic Components
User Interface
List Views
iOS Components & APIs
Android Components & APIs
@ladyleet
Basic Components
CREATING A PROJECT
1. Install Xcode
2. $ yarn global add react-native-cli
3. $ react-native init <appName>
@ladyleet
$ react-native run-ios
@ladyleet
$ react-native run-ios
@ladyleet
1. kill all your processes
2. $ npm start — —reset-cache
@ladyleet
(solves 99% of your problems)
THE MAGIC TRICK
@ladyleet
@ladyleet
SETUP TIPS
Create an /src folder with an App.js
@ladyleet
Copy/paste index.ios.js into App.js
Import App.js into index.ios.js and index.android.js
@ladyleet
STYLING
@ladyleet
STYLING
Using styled-components 💅
@ladyleet
@ladyleet
EXISTING CSS
$ yarn add styled-components
@ladyleet
@ladyleet$ yarn add styled-components
STYLED COMPONENTS
@ladyleet
STYLED COMPONENTS
Create a new variable, which becomes
a React Native component.
@ladyleet
STYLED COMPONENTS
Write normal CSS
@ladyleet
STYLED COMPONENTS
NAVIGATION
@ladyleet
$ yarn add react-navigation
@ladyleet
USING REACT-NAVIGATION
NAVIGATION
@ladyleet
Built-In
StackNavigator
Custom Navigators
TabNavigator
DrawerNavigator
+
NAVIGATION
@ladyleet
TabNavigator
@ladyleet
TabNavigator
import { TabNavigator } from ‘react-navigation’;
@ladyleet
Create components you will be navigating to in /src.
Create a variable to define the TabNavigator.
TabNavigator
Import those components into your App.js
@ladyleet
TabNavigator
@ladyleet
TabNavigatorConfig
tabBarComponent
TabBarBottom
TabBarTop
tabBarPosition
swipeEnabled
animationEnabled
lazy
activeTintColor
activeBackgroundColor
showLabel
style
tabStyle
tabBarLabel
tabBarIcon
@ladyleet
tabBarIcon
@ladyleet
tabBarIcon
@ladyleet
DISPLAYING DATA
@ladyleet
@ladyleet
Create 2 components Questions.js and Answer.js
DISPLAYING DATA
Each component should have a <View/> and <Text/>
Use { this.props.q } and { this.props.a }
We’ll pass the data on the parent component
@ladyleet
DISPLAYING DATA
@ladyleet
Import Questions.js and Answer.js into a component
DISPLAYING DATA
Ex. the React.js component
Create an array of data with questions and answers
@ladyleet
Simply write React!
DISPLAYING DATA
@ladyleet
OUR AGENDA
1.
@ladyleet
2. Building an app
4. Navigation
5.
React Native Components
3. Styling
React Native Ecosystem
@ladyleet
State Management
Animations
React Native Ecosystem
Where to find help
@ladyleet
State Management
setState - react default
Redux - redux.js.org
MobX - mobx.js.org
Morearty - github.com/moreartyjs
@ladyleet
Animations
React Native Animatable
github.com/oblador/react-native-animatable
facebook.github.io/react-native/docs/animated.html
Lottie by Airbnb
airbnb.design/introducing-lottie
React Native’s Animated API
@ladyleet
React Native’s Animated API
Animated gives you 4 animatable component types:
Text, Image, View & ScrollView
Or you can create your own using
Animated.createAnimatedComponent()
@ladyleet
Lottie by Airbnb
Render After Effects animations in real time
@ladyleet
Where to find help
Twitter
Documentation
Medium articles
egghead.io
Front End Masters
@ladyleet
React Native is amazing for JavaScript
developers who want high flexibility and
the ability to build mobile apps with a
powerful JavaScript interface.
@ladyleet
React Native is best for people who want
to have full control of their applications
and understand the intricacies of their
code’s inner workings without heavy
abstractions.
Let’s get into building the actual app!

React Native - Getting Started