Why React Native is NOT garbage.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
the other day another youtuber by the name Tec Lee made a video about why react native is garbage and what I wanted to do in this video was respond to that as someone who has used react native a lot and has been following its development I have some responses to what he said now I don't think me and tech lead actually disagree on this and that's why I want to clarify some of his points I don't think he actually thinks react native as a whole as garbage I think there's a particular use case that is not as good as some of the other use cases and that's really what I want to talk about and go through so I'm gonna be just going through some of his points and responding to them so my first issue with react native and really any hybrid framework is that even though they promise that you only have to write the application code once and then you can share like 95% of our across iOS and Android what happens is you're probably still writing native code and iOS or Android plus you're supporting this third framework react native or whatever else that's going to be so tech lead uses Airbnb as an example there and many of the problems that Airbnb ran into when they were using react native was because they were using it in a hybrid fashion and what I mean by that is they had an existing iOS app an existing Android app and what they did is they slapped react native in there and started using that as well so then they're trying to support three platforms just like tech Lee describes now that's not the only way you can use react native you can also start a new project from scratch and have react native be the base and what you structured off and this is where you can get 95% code sharing between iOS and Android because the majority of it is written in react native now one of the things tech lead says is he doesn't see many companies actually do this where they are putting 95% of their code in react native but usually what we see is maybe 15% of the app only is written in the react native or so I thought this was kind of a weird point the reason why a lot of companies only use react native and say 15% of their application is because they already have an existing iOS / Android app and they invested in that and it's super expensive to just rewrite the entire thing in react native so that's why we're seeing them incrementally adopt it and then when they're starting a new project and there's no technical debt for it or previous code that they've written then that's what they're choosing not to do with iOS / Android and they're considering react native now you may be thinking well sure maybe you just write the whole app in react native but if you take a look at even Facebook they're not doing that in fact I believe only marketplace is written in react native and there hasn't been too much adoption outside of that I haven't worked at Facebook so I don't have any first-hand knowledge of where they are and where they're not using react native but I saw this tweet by Brent from the Expo team and he said Facebook is using react native for more than just marketplace so for example they're using it in the dating app and also in ads manager and oculus and the Facebook app for dating is very recent so that's a place where Facebook could have chose not to use react native if they didn't feel like it was a good fit but that performance is one of the reasons why tech lead believes companies are not building their entire app and react native and you know one of the primary reasons is because of performance so if you take a look code start performance which is the time it takes for react native to load on the first start of the app it's not that fast so because of that startup performance you don't really want to be using rack native on your Start screen which is an issue that Airbnb encountered in their blog post so slower initial load time in react native apps is definitely a thing but the react native article that he references was written a couple years ago and since then there has been some improvements so one of the main things that slows things down at the beginning is a large JavaScript bundle and so there is Ram bundles and inline requires that you can do now and this basically allows you to lazy load to your code so you don't have to basically load the entire bundle at runtime also on the Android side of things it used to be particularly slow and Hermes is a new JavaScript engine that Facebook created that was specifically made to improve startup times decrease memory usage and just produce a smaller app size besides the initial app load time technically doesn't mention just general performance of react native when you're say transitioning pages we're just using the app normally and this is something that came up in the comments so I thought I would touch on it because this is something Airbnb mentioned in their article and they found the performance with react native to be very close to native so this is from the Airbnb article and they said one of the largest concerns around react native was its performance however in practice this was rarely a problem most of our react native screens feel as fluid as our native ones and I would say the majority of apps are doing something similar or less complex than Airbnb in their apps or in their you eyes if you're not doing anything crazy and the majority of the time you're just rendering text and images which if you think about it is really the majority of apps then react natives performance should be fine for you as well with that said there's definitely going to be some times where react natives performance is not going to be good enough this is from the Shopify article where they talked about transitioning to react native and they said they're still going to be using native in some circumstances and not using react native and one of those circumstances is when they need ultra-high performance beyond that that market it's incredibly competitive and you really want to put your best foot forward especially if your competitors are also shipping native apps and you're shipping like a hybrid app then I'm not sure if it's going to be a good long term position if react needs performance is okay for your app I would actually say it's a competitive advantage to use it because you're using a single codebase your team is able to move a lot faster and build out features and fix bugs faster than your competitor now there's also another interesting reason issues with hiring so this was mentioned in the interviewee blog post but a lot of mobile developers they're either iOS or Android developers and they don't really want the branch out of that and start learning react native and become like a rack native developer or a flutter developer or some other framework developer so I actually found this a little bit funny Airbnb actually mentioned that iOS and Android developers we're not reaching out or wanted to join their team as much because they thought they were using react native 100% and this is really just a non-problem if you're using react native in your entire app yeah if you're a company and you use iOS Android and react native I guess you may run into this where developers are not your job because they think you're all react native but in general this is a straight non problem if you're just using react native as your main platform and what I will say about react native in regards to hiring and just the ecosystem in general is it has a very unique attribute because react native is built on top of or utilizes react they react developer can very quickly get up to speed with react native and be very familiar with it and start being very productive very fast with it but overall I would say it could just be simplest to hire to development teams one for ios and one for android if you take a look at whatsapp they scale to 900 million users with only 50 engineers okay if we're talking about simplicity is going to be simpler to hire one team than it is to hire two teams now any tenders across a platform framework it's easy to start rooting through their beautiful website check out their videos their demos their tutorials and everything looks great and it's hard to find fault with that what happens is usually though that they over-promised and under-delivered I 100% agree here I don't want you to get the wrong idea here that I think react native is a perfect framework it has a ton of warts for sure there's definitely a lot of spots which could be improved upon but really this is a lot of frameworks right the toy examples look really great and when you actually start using it in a real project you find out wow it actually has a lot of areas where it is a little bit awkward so you're putting your app in someone else's control and then you have to wait for them to update it especially when there are new platform features like say light mode and dark mode on Android you've got photo both screens a while back with iPhone 10 you had safe areas and a lot of these features I'm going to be supported out of the gate so I haven't followed the new features of Android and iOS closely enough to know how long it actually took for react native to implement them so I was kind of curious so I looked up one of them for a safe area of view and this was something I believe that became a thing with the iPhone X which came out in November 3rd 2017 and if we look at the releases for react native we'll see they introduced safe area of view in this giant release and this giant release happened in October so October 11th 2017 so if we come back that's about 15 days maybe 20 days before it actually released so you could say that they didn't give enough time for you to actually add this to your app before it was released but react native did get in time at least before it was launched I was too lazy to look up the other features so I don't know if react native was slower to implement them but either way this is definitely a downside right we have to rely on react native or react native team to implement this but for the most part this is usually not a deal breaker in general and then we've seen some other companies continue to support react native like Walmart discord Microsoft so I think that there was some usage cases but I wanted to present the case against it and why I think for many people I don't think it's going to be a great user scenario this was something tech lead said at the beginning of his video and it's the main thing that I disagree with yes if you have an existing iOS / Android app and yes if you need ultra performance react native may not be the right fit it's harder to justify it there but if you're starting a new app and you're not doing anything too crazy which I would say is most apps then react native can be a really good fit and that's where you can write your code once and share like 95% of it between platforms and it can save you a ton of time and be a huge benefit and that's when I really recommend taking a look at react native and considering it for your next project you
Info
Channel: Ben Awad
Views: 392,217
Rating: 4.8450904 out of 5
Keywords: react native, flutter, mobile, ios, android, swift, kotlin, app, app development, software, programming, coding, react, fang, silicon valley, google, facebook, techlead
Id: ptTfQvbu9Ko
Channel Id: undefined
Length: 10min 30sec (630 seconds)
Published: Thu Feb 06 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.