React Native Just Made A Long Overdue Change

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
using a react native framework such as Expo is now the recommended way to create new react native apps you can read more about our Official Guidelines and our latest blog post or you watch this video we're going to break it all down because this is a huge huge change for those who don't know react native was not easy to set up back in the day and by back in the day I mean honestly up until everyone started using Expo and even then the people who weren't it was a rough time setting up react native involves not just setting up a JavaScript project but setting up a JavaScript project using an obscure bundle called Metro and also setting up an iOS project and an Android project using the native tools for both and then creating the bindings and the relationship between all of those things it's it's miserable and I've had enough of a rough time throughout my career getting that working that I gave up long ago and moved to Expo and it's been a great thing there's a reason that when we support upload thing with react native we do it almost entirely through Expo because anything else seemed like suicide which by the way if you're react native Dev and you want to add file up to your service upload thing is the best way to do it if somehow this isn't the best way to do file upload your mobile app hit us up and we'll fix that anyways sorry for the self-plug we're here to talk about react native so what's going on here why are they recommending a framework at react comp we updated our guidance on the best tool to get started building react native apps a react native framework a toolbox with all the necessary apis to let you build production ready apps using react native Frameworks such as Expo is now the recommended approach to create new apps I love that they said such as expo here they're not hiding it if you're not familiar with the drama that we've already had with react for web create react app went through something similar if we go to the react dodev site for the actual react docs we search for framework they have a whole section here for how they recommend starting a new react project if you want to build a new app or a new website fully with react we recommend picking one of the react powered Frameworks popular in the community you can use react without a framework however we found that most apps and sites eventually build solutions to common problems like code splitting routing data fetching and generating HTML these problems are common to all UI libraries not just react they recommend you start with a framework because create react app was not it was a mess and especially with new things like server components and deep routing data loading patterns becoming more and more common in react having a framework that can support those things without your team having to build them yourself is effectively essential I heard somebody earlier in chat mentioned that they had multiple employees at their company that's job is just dealing with parcel the bundler these Frameworks all handle those things for you you don't have to think about bundlers anywhere near as much if you're using next or remix or V or any of these other tools they just kind of take this problem away so they recommend on react that you look at nextjs or remix they need to remove Gatsby from this because it's like formally dead at this point but also they have Expo in here for Native apps and they don't put V in here sadly because it's not a full stack framework it's just a bundler but you get the point I'm just happy that create react app isn't in here anymore because it shouldn't be and the equivalent is happening with react native where create react native is no longer recommended at all they tell you explicitly that you should use a framework such as Expo as the recommended approach so why do they care why are we doing this well first we need to answer what is a react native framework which might be a good question for a lot of y'all I mean us deep Expo devs know but if you don't why would we need a framework we don't need a server we don't need all these fancy bundlers and things what's the importance of a framework in react native well if you've been building production apps for long enough you almost certainly know that there's a set of common problems that we need to solve sooner than later when building any application on either web or native you probably want your users to navigate through different screens fetch data store the state of your user and more but for Native apps there's even more to deal with you need tools to upgrade the native code between react native versions you need to manage compatible versions of all your dependencies and you even need to deal with the na of build tools don't get me started on xcode or Android Studio please it's it's rough it's real rough in these days even I I was talking to some people who are deeper in the xcode world and the way it was described to me is xcode is still based on the next step code base if you don't know too much Apple history Next Step was the operating system that Steve Jobs built at his company next after he got fired from Apple because he knew that apple had a operating system and needed something better and the only way they could get that is if they bought him so he built the whole computer company just to build the operating system that Apple needed so that Apple would be forced by him so that they could have the operating system genius move one of those like 4D chess things that jobs always did and yeah xcode is still based on the dev tools for next step and they've just kept adding things on top like xcode is not a tool where they deprecate which is why it's a massive bundle it's why it's so slow and miserable and the the chaos of that world is where it's at G yeah no xcode is miserable oh that's a great chat from YouTube crazy enough xcode is so user friendly if you hate your users and you want to make them suffer totally agree anyways it takes a village to bring an app from idea to production without the right tools I mean it takes a lot of work to do it with the right tools too but the village is just supporting the tools we want you to focus on writing beautiful applications and features for your use and not just solving those common problems over and over again that's why we believe that the best way for you to experience react native is through a framework that offers a toolbox with all the necessary tools you need to build production ready applications we found that you're either using a framework or you're building your own framework I love this line This has become part of like the react ethos and generally the web dev ecosystem is embracing this too even places like solid have acknowledge that yeah if you don't have something like solid star or in spel you don't have something like spelt kit you end up Reinventing all those things yourself anyways so what if we had a good enough common solution so we're not Reinventing everything we can just build it's like almost the PHP ification of JavaScript where we're realizing these tools are valuable they shouldn't provide everything but they should provide the common things so that you can get back to work and plug the right Legos and on top later on there's nothing wrong with building your own framework though by crafting your own solutions for routing navigation deployment and so on major corporations like meta and Microsoft build their own Frameworks internally to integrate deeply into their existing Brownfield applications but we believe believe that most people will be better off by using an existing framework this is an important Point too cuz a lot of react native apps aren't starting as react native apps they're starting as existing old ancient Native apps I've heard crazy things like the Instagram app from a cold start takes like a day to build like over 24 hours actual insanity if you also have to add a bunch of additional things to plug react native in as a shim in there that's rough if you can get that working with Expo awesome you should do that but for those who don't have those opportunities God it can be miserable it can be real real miserable and that's why these things are so important because for those who are Green Field we need a happy path but also those who aren't Greenfield they're kind of and the fact that new apps and ancient apps had the same Dev experience with react native meant everyone was suffering but at the very least starting new apps is way better now be nice to have happier pths for integrating into existing apps because a lot of companies want to make it so certain teams can move faster and if you have a web team that's doing a great job on like the store for something like Instagram you want to add that to the native apps but you don't want to hire a bunch of IOS and Android Engineers to just do those two features and keep them all in sync well if you could have the react devs contribute that feature in react native that's really beneficial that's why these companies have teams building both react native itself and all the tools around it which by the way if you don't know this Microsoft is actually building react native for both Windows and Mac OS and they use it heavily in Windows 11 for things like the start menu and most of the Xbox UI is react native as well just crazy anyways if you've been using react on the web you're probably familiar with the similar concept of production grade react Frameworks that's the article we just pulled out pre-read clearly as of today the only recommended Community framework for react native is Expo Folks at Expo have been investing in the react native ecosystem since the early days of react native and as of today we believe the developer experience offered by Expo is Best in Class Expo the framework is and will always remain free and open source while the Expo application service is an optional paid service which by the way EAS so good remember earlier I was talking about how miserable xcode is to deal with what if you didn't have to e is Expo hosting a bunch of mac build machines for you so you just hand them your react native project give them the credentials for your Apple developer stuff and they just generate the app they just give you the file to install and have a button to Auto send it to the App Store the amount of I have dealt with in my life that Expo has turned into two clicks is unbelievable it feels just like when they first use verel after you lived an FTP deployments for your whole life you just click two buttons and it builds it's so good you can actually build an IOS app without having an xcode installation on your computer hell you can build an IOS app now on Windows it's so good I see people in chat saying that they actually rent a Mac only to build their iOS Progressive web app shell in xcode because they don't own a Mac and Es or E would be so much cheaper yep it's so good I know people who aren't even on react native that are using e just because it's one of the best ways to build mobile apps Katie did a great talk at react comp this year all about why Expo is so good for react native devs they also have a getting started page too for those who are interested links in the description you can find all these from there so how will Frameworks actually affect you well if you're already using a recommended framework like Expo you're good to go if you'd like to migrate your existing app to Expo you can find instructions on the official Expo website they offer many benefits such as an easier way to upgrade your react native versions better developer experience and much more react data version upgrades are still hell not going to pretend otherwise I will continue to talk very posit POS L about react native as it enables both a great developer experience and a platform for developers to do awesome things for their users but man upgrading react native versions as hell like actual one of the most miserable things I've had to do half the time I'll just initialize a new project copy over all of the actual source code and then fix whatever's broken from there because trying to bump things has been so miserable for me especially when you're dealing with IOS and Android dependency that are entirely different their own separate chains miserable they also say though that if you can't or don't want to migrate Expo you're fine use react native without an official framework will continue to be supported the tools that you've been using like react native Community CLI template and the upgrade helper will all continue to work as usual the react native init command though has moved out of core and is now accessible via react native Community CLI latest init yeah they don't want react native the package to have an opinion on how to initialize so now you can just go do that they have a bunch of further reading here for those who are curious and want to better understand these things one more thing I'll recommend that you check out if you're into react native and you even vaguely know what server driven UI means you should watch this and if you don't know what server driven UI is you should go watch my other server component videos and then go watch this because Evan Bacon's Universal react server component stuff is so mindblowing it's so cool the idea of native uis being driven from the server is not just like cool and exciting it fundamentally changes how most software devs can build mobile apps right now big companies like Facebook and Google have crazy systems they've built to allow the server to describe not just what data the UI will use but what shape the UI should present that data in and all of these companies have invented their own crazy syntaxes to send UI structures effectively like HTML from the server to your phone so that if the new type of post appears on Facebook you don't have to update your app just to see this new shape of a post that type of server driven stuff has been essential in Mobile Dev forever now because you don't know which version of the app a user might be on if they're on an old version you can't just not ship your new feature so the server being able to tell any version of the app hey this looks like this is essential and server components make that trivial server components make it so that type of really complex architecture is now generally available to any Dev even a solo Dev working on a side project where previously absolute chaos so that's exciting check this out it'll be linked in the description I'm so hyped with what XO is doing I'm really excited for the future of react native and I hope you are too let me know in the comments what you're feeling until next time peace nerds
Info
Channel: Theo - t3․gg
Views: 53,429
Rating: undefined out of 5
Keywords: web development, full stack, typescript, javascript, react, programming, programmer, theo, t3 stack, t3, t3.gg, t3dotgg
Id: ek_IdGC0G80
Channel Id: undefined
Length: 11min 56sec (716 seconds)
Published: Wed Jul 03 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.