snel voor meerdere platformen tegelijkertijd ontwikkelen 1: gemakkelijk en snel voor een specifiek platform ontwikkelen “Different platforms have different looks, feels, and capabilities, and as such, we should still be developing discrete apps for each platform, but the same set of engineers should be able to build applications for whatever platform they choose, without needing to learn a fundamentally different set of technologies for each.” - Tom Occhino
using React 1: Native counterparts, platform specific components React JavaScriptCore Higher-level platform-specific components “The bridge” 10/10 would not recommend
React, { Component } from 'react' import { Text, View } from 'react-native' class UIComponentsSample extends Component { render() { return ( <View> <Text>If you like React on the web, you'll like React Native.</Text> <Text> You just use native components like 'View' and 'Text', instead of web components like 'div' and 'span'. </Text> </View> ); } } ... render() { return ( <View> <Switch/> <TextInput/> <Slider/> </View> ); } … render() { return ( <View> <ProgressViewIOS/> <ProgressBarAndroid/> </View> ); }
React, { Component } from 'react'; import { Text, View, StyleSheet } from 'react-native' class WhatsYourStyle extends Component { render() { return ( <View> <Text style={styles.red}>Some red text.</Text> <Text style={styles.bigblue}>Some big text in blue.</Text> <Text style={[styles.bigblue, styles.red]}> Some big bold blue text overwritten to red. </Text> <Text style={{color: “green”, fontSize: 30}}> Some text styled inline to be huge and green. </Text> </View> ) } } const styles = StyleSheet.create({ bigblue: { color: 'blue', fontWeight: 'bold', fontSize: 30 }, red: { color: 'red' } })