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

Desarrollo de aplicaciones con react native by @charliesbox

gdljs
August 22, 2016

Desarrollo de aplicaciones con react native by @charliesbox

gdljs

August 22, 2016
Tweet

More Decks by gdljs

Other Decks in Technology

Transcript

  1. R e a c t N a t i v

    e Building native apps. With JS.
  2. What we want • Similar web development cycle • Hot

    fixes on the fly (did you say iOS?) • Code reuse • Unique UI per platform
  3. class Example extends Component { render() { return ( <View>

    <Text style={styles.text}> Hello World! </Text> ); } }; It’s all about JS var styles = StyleSheet.create({ text: { flex: 1; justifyContent: ‘center’; backgroundColor: ‘#000’; } });
  4. React Native iOS Android <View/> UIView View <Button/> UIButton Button

    <DatePicker/> X X <DatePickerIOS/> <DatePickerAndroid/> UIDatePicker DatePicker
  5. Performance + UI React uses the UI components that are

    native to the platform that it runs on.
  6. @interface RCTMapView : RCTViewManager @end @implementation RCTMapManager RCT_EXPORT_MODULE() - (UIView

    *)view { return [[MKMapView alloc] init]; } RCT_EXPORT_VIEW_PROPERTY(showsUserLocation, BOOL) @end //Usage in javascript const MapView = requireNativeComponent("RCTMap", null); // In a render function: <MapView showsUserLocation={true} />
  7. R e a c t N a t i v

    e R e n d e re r A n g u l a r