This talk from Droidcon NYC 2018 covers:
* The history of React Native at Airbnb
* Organization challenges we faced building a cross-platform team
* Introduction to MvRx, Airbnb's Android architecture (https://github.com/airbnb/MvRx)
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
Lessons Learned From Cross-Platform at Airbnb + MvRx
1. HOSTED BY GABRIEL PEAL · @GPEAL8 · DROIDCON NYC '18
Something Something Cross-Platform
$99 PER NIGHT
2. ^
Maybe
Why Cross-Platform is Terrible
And You Should Not Do It
Why Cross-Platform is Terrible
And You Should Not Do It
Why Cross-Platform is Terrible
And You Should Not Do It
SometimesGood
SometimesBad
^
DependingOnThe
NeedsOfYourTeam
^
3. •An concrete answer for your team
•A React Native roast
•The technical pros and cons of React Native
Whatthistalkis NOT
11. Whatdidwebuild?
AirbnbEng
2017
• 220 Screens
• 80kloc product 40kloc js infra
• 95% files had no platform split
• Native navigation
• Shared element transitions
• Long lists
• Parallax
• 15% of mobile engineers used RN
12. Howwasitsupported
AirbnbEng
• 2 engineers on infra
• Support from 6 native infra engineers
• Lots of mentorship
• Lots of code reviews
• Lots of meetings with teams
• Lots of internal promotion
2017
13. 2017Survey
AirbnbEng
• Did you ship code faster or slower?
• 6 managers said faster, 4 managers said slower
• How was your overall experience (n=19)?
• 11 amazing, 4 slight positive, 3 negative, 1 very negative
• Previous experience
• 10 React, 7 Android, 8 iOS, 2 React Native
• Would you do it in React Native again?
• 12 yes, 7 no
2017
15. OrganizationalChallenges
• Polarizing
• 3 Platforms
• Support
• Testing
• Community
• Native or RN
• Resourcing
• Web Crossover
• Iteration Speed
• Hiring
• Cross platforms frameworks have a bad reputation
• Engineers are humans too.
• Bad experiences invite confirmation bias
• We did this
16. OrganizationalChallenges
• Cross-platform does not replace native
• No engineer knows three platforms well
• Must have 3 dev environments set up
• Must wrap native maps, video, Lottie, etc.
• Android and iOS APIs may not be aligned
• Sharing state
• Polarizing
• 3Platforms
• Support
• Testing
• Community
• Native or RN
• Resourcing
• Web Crossover
• Iteration Speed
• Hiring
17. OrganizationalChallenges
• Polarizing
• 3 Platforms
• Support
• Testing
• Community
• Native or RN
• Resourcing
• Web Crossover
• Iteration Speed
• Hiring
• Some teams will have no native experience.
• Core team must be able and willing to help
• Incentives must be aligned
• Less mature and fast moving platforms
• Future infrastructure must be bridged
• Featureteamscannotowntheplatform
18. OrganizationalChallenges
• Not enough RAM for all 3 platforms
• Most people only run one emulator at a time
• Don't know the other platform paradigms as well
• Root-cause attribution
• Polarizing
• 3 Platforms
• Support
• Testing
• Community
• Native or RN
• Resourcing
• Web Crossover
• Iteration Speed
• Hiring
19. OrganizationalChallenges
• Polarizing
• 3 Platforms
• Support
• Testing
• Community
• Native or RN
• Resourcing
• Web Crossover
• Iteration Speed
• Hiring
• Younger community
• StackOverflow tags
• 1.1M Android
• 574k iOS
• 36k React Native
• 4k Flutter
• Online answers frequently out of date/deprecated
• OSS projects have unequal quality on different platforms
20. OrganizationalChallenges
• Polarizing
• 3 Platforms
• Support
• Testing
• Community
• NativeorRN
• Resourcing
• Web Crossover
• Iteration Speed
• Hiring
• "Should we use native or React Native?" x1000
• No easy answer
• Never know if you picked the "right" answer
21. OrganizationalChallenges
• Who do eng managers hire?
• Limited headcount
• Polarizing
• 3 Platforms
• Support
• Testing
• Community
• Native or RN
• Resourcing
• Web Crossover
• Iteration Speed
• Hiring
22. OrganizationalChallenges
• We saw very little migration from web to RN
• Eng managers didn't adjust headcount
• Same engineer could build Web, Android, and iOS
• Web engineers aren't used to considering mobile
• Web engineers don't know when going native is appropriate
• When it worked, it worked well though
• Polarizing
• 3 Platforms
• Support
• Testing
• Community
• Native or RN
• Resourcing
• WebCrossover
• Iteration Speed
• Hiring
23. OrganizationalChallenges
• Cross platform may feel longer from the perspective of
one engineer
• 1 week * 2 engineers > 1.5 weeks * 1 engineer
• Polarizing
• 3 Platforms
• Support
• Testing
• Community
• Native or RN
• Resourcing
• Web Crossover
• IterationSpeed
• Hiring
24. OrganizationalChallenges
• External perception may be 100% RN
• Native engineers don't want to join a cross-platform company
• Need strong native engineers to maintain cross-platform infra
• Need native engineers to know when to go native
• New interview pipeline
• Polarizing
• 3 Platforms
• Support
• Testing
• Community
• Native or RN
• Resourcing
• Web Crossover
• Iteration Speed
• Hiring
25.
26. • We launched experiences
• We shipped 220 screens
• People who used it generally liked it
• At times, it felt like we were years in the future
Didwefail?
!=
51. MvRx
• No lifecycles!
• Everything is off main thread
• Kotlin first and only
• Can incrementally adopt
• Handles process restoration
• Used for the most complex screens
• Internal project 2400 -> 600 LOC
• ToDo-MvRx 1500 -> 750 LOC