react nativ ive
play

React-Nativ ive Garca lvarez, Pelayo Gonzlez Melndez, Alejandro - PowerPoint PPT Presentation

React-Nativ ive Garca lvarez, Pelayo Gonzlez Melndez, Alejandro Gutirrez Fernndez, igo Megido Garca, Luca Multiplatform development environment What is React Native development Native? Released by


  1. React-Nativ ive • García Álvarez, Pelayo • González Meléndez, Alejandro • Gutiérrez Fernández, Íñigo • Megido García, Lucía

  2. • Multiplatform development environment What is React • Native development Native? • Released by Facebook in 2015

  3. • React framework + Native development • React primitives render to native platform UI • Core components mapping to native UI building blocks: How does it • View work? • ScrollView • ImageView • Text • …

  4. Power Stakeholders

  5. Quality Attributes

  6. Reusability and • One code base → multiple platforms (IOS, Android, UWP, …) Learnability • Written in JSX, syntax extension to JavaScript

  7. Modularity • Open Source and • Uses npm Community • Components → great collection of third-party libraries Support

  8. Performance • Mostly native code, be it Swift, Java or C#

  9. • React Native focuses on UI design Usability • Responsive

  10. Security and • Native code should be more stable and secure Reliability • Maintained by Facebook

  11. Constraints • JavaScript • NodeJs • Package Manager (npm , yarn…) • Python • Reusability

  12. Features and modules

  13. • React + native capabilities How does it • Javascript -> access platform API's work? • React Components

  14. Core Components • <View> • <Text> • <Image> • <ScrollView> • <TextInput>

  15. Native Modules • Javascript functions • Implemented natively for each platform • When is it used? • Capabilities needed -> React Native does not include a module

  16. Creating a Native Module • Create the application • Create the module • Add module in package.json

  17. Architecture

  18. Platform UI Layout JavaScript (Shadow Tree) onScroll view.appendChild(RCTView) […, createView(id, RCTView, ...)]

  19. Fabric

  20. Platform UI Layout JavaScript JavaScript Interface (JSI) getNativeModule('GPS').getCoordinates()

  21. Native Modules getNativeModule('GPS').getCoordinates() JSON const coordinates getNativeModule('Uploader').upload(coordinates) JSON Android JavaScript

  22. Native Modules getNativeModule('GPS').getCoordinates() void* coordinates const coordinates coordinates .setAlpha(0) getNativeModule('Uploader').upload(coordinates) Android JavaScript

  23. Application Expo CLI QuickStart – React Native CLI

  24. Expo CLI

  25. React CLI • Requirements: Node, python2 and jdk • Android Studio: • Android SDK • Android SDK Platform • Intel HAXM (or AMD equivalent) • Android Virtual Device

  26. Thanks for your attentio ion!

Recommend


More recommend