react native-meetup-talk

16
INTRODUCTION TO REACT NATIVE Presentation by / Kiran Abburi @kiran_abburi

Upload: kiranabburi

Post on 08-Aug-2015

62 views

Category:

Internet


2 download

TRANSCRIPT

Page 1: React native-meetup-talk

INTRODUCTION TO REACT NATIVEPresentation by / Kiran Abburi @kiran_abburi

Page 2: React native-meetup-talk

ABOUT MEFreelance web developerMostly working on frontend projectsCurrently focusing on React.js

Page 3: React native-meetup-talk

MEETUPInvite for speakersGeneral feedbackFacebook group reactjs-bangalore

Page 4: React native-meetup-talk

AGENDAIntroductionWhy react-native ?ComponentsStylingLayoutWalk through code samples

Page 5: React native-meetup-talk

REACT.JSAwesome for web development

Composable componentsDeclarativePredictable

React Native brings these ideas to mobile

Page 6: React native-meetup-talk

WHY REACT NATIVE ?Native apps vs Web appsNative is hard but feels goodWeb apps are familiar but compromises user eperienceReact native brings best of both worlds

Page 7: React native-meetup-talk

WHY NATIVE IS HARDER THAN WEB ?Huge learning curveSlow development cycleHard to debug

Page 8: React native-meetup-talk

WHY NATIVE IS BETTER THAN WEB ?Better feeling and experienceNative componentsSophisticated touch handlingParallelize work onto multiple threads

Page 9: React native-meetup-talk

REACT NATIVELearn once and write everywhereEasy of learning and debugging from webNative experience and performance

Page 10: React native-meetup-talk

QUICK STARTInstall depedencies: Xcode, node, watchmannpm install -g react-native-clireact-native init MyProjectOpen MyProject.xcodeproj and hit run in XcodeLook at project structure and index.ios.js

Page 11: React native-meetup-talk

DEBUGGINGreact packager watches file changes and bundles on everychangeCMD + R to load code changesChrome developer tools & React developer tools

Page 12: React native-meetup-talk

APIReact.createClass to create componentsBunch of react native componentsAppRegistry.registerComponent to register rootcomponentsStyleSheet.create for creating style sheets

Page 13: React native-meetup-talk

COMPONENTSReact Native components are wrapper around native uicomponentThey provide declarative APIView -> divText -> spanImage -> imgTextInput -> input

Page 14: React native-meetup-talk

STYLESCSS in javascriptSupport for only selected css properties

Page 15: React native-meetup-talk

LAYOUTImplemented for layoutFlexbox is new layout module for web

Flexbox

Page 16: React native-meetup-talk

CODE SAMPLE