1 of 52

React Native

Overview

Bonnie Eisenman

NYC JavaScript React Group

2 of 52

Hi, I'm Bonnie.

3 of 52

So what is React Native?

4 of 52

Using JavaScript to write truly native, cross-platform apps for iOS & Android.

5 of 52

6 of 52

React is a JavaScript library

for building user interfaces.

7 of 52

8 of 52

Components

React component

properties, state

In React, UI is a function of state and props.

9 of 52

Describe your UI with React,

& React renders it for you.

10 of 52

Wait, why render to the DOM at all?

11 of 52

12 of 52

React Native is

actually native.

13 of 52

React vs React Native

is just

web vs mobile

14 of 52

Browser DOM versus mobile

  • <View>
  • <Image>
  • <Text>
  • <ListView>
  • <div>
  • <img>
  • <span>, <p>
  • <ul>, <ol>

15 of 52

You're invoking real APIs!

16 of 52

(that's it!)

17 of 52

Using React Native

18 of 52

render() {

return (

<View>

<Text>Hello, NYC</Text>

</View>

);

}

19 of 52

<DatePickerIOS

date={this.state.date}

mode="date"

/>

20 of 52

21 of 52

22 of 52

Styling?!

23 of 52

24 of 52

25 of 52

(no but like actually)

26 of 52

container: {

flex: 1,

alignItems: 'center',

paddingTop: 30

}

27 of 52

28 of 52

29 of 52

30 of 52

Developer Setup

31 of 52

It's just normal mobile dev, with JavaScript.

32 of 52

33 of 52

34 of 52

35 of 52

36 of 52

Over-the-air updates!

37 of 52

38 of 52

Working with React Native

  • Mostly, just like React for Web
  • Standardized styling API
  • Native performance & look-and-feel
  • Native API access
  • Faster development process

39 of 52

So what's it mean?

40 of 52

Mobile is hard.

41 of 52

Developer experience matters.

42 of 52

Your tools should solve real problems.

43 of 52

React Native Advantages

  • No more silos
  • Code sharing without compromising on quality
  • Shorter feedback cycle
  • More tools
  • Native development, when you need it

44 of 52

45 of 52

So what's the catch?

46 of 52

Open Problems

  • Best practices around hybrid apps
  • Navigator complexity
  • Animations (see: react-motion, Animated, etc)
  • Upgrade path

47 of 52

JavaScript

48 of 52

49 of 52

Who's Using It?

50 of 52

What's Next?

  • More platforms?
  • More solutions to common problems
    • Better gesture handling
    • Improved animations
    • Over-the-air updates
  • Tool simplification?
  • ???

51 of 52

52 of 52

Thanks!

  • Talk to me! I'm @brindelle.
  • Buy my book! 40% off with code AUTHD at bit.ly/learningreactnative
  • Thanks!