Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Thijs Suijten - React Native - Buy One Get One Free

Thijs Suijten - React Native - Buy One Get One Free

droidcon Berlin

July 17, 2018
Tweet

More Decks by droidcon Berlin

Other Decks in Programming

Transcript

  1. import React from 'react'; import { StyleSheet, Text, View, Image

    } from 'react-native'; export default class App extends React.Component { render() { return ( <View style={styles.container}> <Text style={styles.text}>Hello Tweakers!</Text> </View> ); } } const styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center', justifyContent: 'center', }, text: { fontSize: 30, } }); Build native apps with React & JS
  2. React Native is not perfect... # Young technology (0.55) $

    Future proof? % Less performance & Native feel?
  3. Native Navigation // Native Kotlin code override fun receivedEvent(event: Event)

    { when (event.id) { "next" -> startActivity(...) } } React Native Bridge // JS code <Button onPress={() => this.sendEvent('next')} title='Verder'/>
  4. sed -i '' 's/#import <RCTAnimation\\/RCTValueAnimatedNode.h>/ #import \"RCTValueAnimatedNode.h\"/' ./node_modules/react-native/ Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.h sed

    -i '' 's/#import <fishhook\\/fishhook.h>/#import <React\\/ fishhook.h>/' ./node_modules/react-native/Libraries/WebSocket/ RCTReconnectingWebSocket.m (
  5. React Native: Thing to consider • Multidisciplinary team • Android

    first • Everybody is onboard and willing to make concessions