Slide 1

Slide 1 text

Exposing Native Modules with React Native

Slide 2

Slide 2 text

Hi, I’m Naoufal Naoufal

Slide 3

Slide 3 text

Hi, I’m No-Fell Senior UI Engineer @ Unsplash

Slide 4

Slide 4 text

Hi, I’m No-Fell Senior UI Engineer @ Unsplash

Slide 5

Slide 5 text

Hi, I’m No-Fell Senior UI Engineer @ Unsplash

Slide 6

Slide 6 text

Unsplash Do whatever you want high-resolution photos

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

Join the Team [email protected]

Slide 14

Slide 14 text

What’s React Native Build mobile apps using only JavaScript real

Slide 15

Slide 15 text

What’s React Native Build mobile apps using only JavaScript real

Slide 16

Slide 16 text

What’s React Native Build mobile apps using only JavaScript real

Slide 17

Slide 17 text

React Structure

Slide 18

Slide 18 text

React Structure React React Native React DOM

Slide 19

Slide 19 text

React Structure React React Native React DOM

Slide 20

Slide 20 text

React Structure React React Native React DOM

Slide 21

Slide 21 text

React Structure React React Native React DOM

Slide 22

Slide 22 text

React Structure React React Native React DOM

Slide 23

Slide 23 text

React Structure React React Native React DOM

Slide 24

Slide 24 text

React Structure React React Native React DOM Native UI Components & Modules

Slide 25

Slide 25 text

What are Native Modules

Slide 26

Slide 26 text

What are Native Modules

Slide 27

Slide 27 text

Some of my Packages

Slide 28

Slide 28 text

Exposing Native Modules

Slide 29

Slide 29 text

Exposing Native Modules • Create a new Library with the RN CLI

Slide 30

Slide 30 text

Exposing Native Modules • Create a new Library with the RN CLI • Linking your Library to a Project

Slide 31

Slide 31 text

Exposing Native Modules • Create a new Library with the RN CLI • Linking your Library to a Project • Define your Methods in JS

Slide 32

Slide 32 text

Exposing Native Modules • Create a new Library with the RN CLI • Linking your Library to a Project • Define your Methods in JS • Match those Methods in Native

Slide 33

Slide 33 text

Exposing Native Modules • Create a new Library with the RN CLI • Linking your Library to a Project • Define your Methods in JS • Match those Methods in Native • Implement the code

Slide 34

Slide 34 text

New Library

Slide 35

Slide 35 text

New Library

Slide 36

Slide 36 text

Link your Library

Slide 37

Slide 37 text

Link your Library react-native link*

Slide 38

Slide 38 text

Link your Library react-native link*

Slide 39

Slide 39 text

JavaScript Methods

Slide 40

Slide 40 text

JavaScript Methods

Slide 41

Slide 41 text

Native Methods

Slide 42

Slide 42 text

Native Methods

Slide 43

Slide 43 text

Implementation

Slide 44

Slide 44 text

Implementation

Slide 45

Slide 45 text

Using your Library

Slide 46

Slide 46 text

Using your Library

Slide 47

Slide 47 text

Using your Library

Slide 48

Slide 48 text

Helpful Tools

Slide 49

Slide 49 text

Helpful Tools • RCTConvert for converting Types

Slide 50

Slide 50 text

Helpful Tools • RCTConvert for converting Types • RCTUtils for error handling

Slide 51

Slide 51 text

Helpful Tools • RCTConvert for converting Types • RCTUtils for error handling • Sending Events to JavaScript

Slide 52

Slide 52 text

Helpful Tools • RCTConvert for converting Types • RCTUtils for error handling • Sending Events to JavaScript • Export Constants to avoid bridge round-trips

Slide 53

Slide 53 text

Helpful Tools • RCTConvert for converting Types • RCTUtils for error handling • Sending Events to JavaScript • Export Constants to avoid bridge round-trips • Apple Developer Documentation

Slide 54

Slide 54 text

Thank you @naoufal on Twitter & GitHub