I don't *want* to use React Native
HTML-код
- Опубликовано: 25 авг 2024
- React Native doesn't build the best apps, but I would choose it over building 2 apps with Swift/Kotlin for iOS/Android store.
#benawad #reactnative
----
Follow me online: voidpet.com/be...
#benawad
I just come here to hear Ben ASMR
Yes that's what it's called. I was trying to think of a name for why I keep coming back.
Truuuu
Hahahahahaha
wtf
@@thecashewtrader3328 lmao
"There are some developers out there that will write you an app in assembly and it just comes out slower than a python interpreter"
Lol
I don't want to use React Native(as a millionaire)
TechLead’s line
More like Clement mihilsenoughAlready with the AlgoExpert plug.
Lol... toasted....
But are you a divorced tech lead that was working for fb?
He is great teacher, I don't know why he used that title, whatever.
I feel like developer experience is severely underrated. The power of having a single codebase way outweights any performance or size costs you add imo. Especially in 2020 when everyone is dropping support for any device more than 10 years old.
companies don't and don't need to optimise experience for developers. they want best experience for the users.
Companies should optimize user experience for the user...
Just a few performance issues on react native for the user means the company is going to lose millions of dollars, so its actually cheaper to have two teams.
Your opinion is wrong IMO. Hyrbrid frameworks are always frustrating as hell to work with, full native is a way better development experience and it yields a superior product. The only reason to go hybrid is if the business is on a shoestring budget or cannot find competent enough programmers.
@@Goremachine Yeah, antoher fun thing is some devs need to write native code and abstract it with react native xd imagine
"a single codebase way outweights" You mean a single codebase that has Javascript AND Swift AND Kltlin code? Yeah 3 codebase in one, and pretend it's fine
"It's the way things are, life sucks" - New React Native Slogan.
Zuck is a computer lizard though
I think that native development should be done just to know what react native is abstracting, but I feel like in a year react native will be able to create apps that can contend with native development
bro you scared me in the beginning
Ben is Ben 😂
I’m a WET programmer. It’s so much easier.
Write Everything Thrice
Why even try?
These thirsty bots are getting smarter
@@volmehen I felt that...
Write Extra Tests?
This guy looks like he's always smiling or about to laugh
Indeed 🤣😂
Probably worth revisiting now that Flutter for web is production ready.
yessssssssss
I just recently built my first app in React Native and this video makes me very happy
What I’ve been hearing that interests me is companies making apps that are native but utilize React Native for specific views (like a profile view, or a view that fetches and displays rows of data).
I believe I read that Airbnb is one of the proponents of this approach.
Performance is less of an issue everyday when you carry a super computer in your pocket
Honestly I prefer Flutter over React Native but I see why people choose RN.
yeah I've been using flutter, it's missing a few things but it's getting there
@@handsanitizer2457 I've been learning flutter for a week and i don't have any development experience so i can't even compare them what do you think should i switch to rn for adapting to web easily in future or just stick to flutter
@@burakkosova8481 just stick to flutter. But, it's up to you. I just started learning flutter a few days ago and i'm used to react native (not saying that i'm an expert at it). But for me, since rn use javascript, it was easier for me to learn.
@@StarBattle08 yeah committing to one technology would be better i guess thank you
For me personally, I prefer RN because Flutter uses Dart which is OOP. While in RN I can use something like ReasonML for FP. IMO writing logic is way more crucial than building UI
4:11 this totally opened my eyes to why I absolutely need to use React and React Native for my personal project. This alone saves so much time and work for solo devs.
One of the better 30 second intros I´ve seen on RUclips. Well done.
As a flutter dev I have to say that the code sharing between native apps and web is actually very easy now. Flutter web is still in beta so it has some quirks that you have to account for but for the most part it's a very smooth experience between mobile and web (I would argue that more so than with react native and web). Obviously for companies it's much easier to find react devs and put them to work with react native with very small amount of time needed for adjustment which is probably react native's biggest asset right now compared to competition.
Not to mention transpiling for desktops is also quite easy, (quirks as well) but still
Good luck with SEO on your flutter app
@@HonestCode you mean google play SEO? lol
If you do Flutter you can make the website in the time you saved using Flutter. I have made two production apps using RN, and am now about halfway in my first Flutter app. My impression so far is that if developing an app natively for iOS and Android is 2, then React Native is about 1.5. Flutter feels more like 0.8 so far.
As long as you develop CRUD apps with mostly just forms and standard widgets you'll probably be OK with either, but when it is time for slippy maps and video playback I had serious headaches with RN, especially on the Android side.
thanks for that, I share your opinion, I think many developers are also just missing the business side of code and digital tech in general - just beeing able to move to the market faster with a smaller team and a shared codebase enables organizations to stay more flexible, especially in highly uncertain market environments, which is a huge benefit for me from a business innovation and transformation perspective.
senator, we run ads
**cheeky mark smile**
More react tutorials please. Love ya Ben
You just made my day better Ben !
Love from Nigeria.
awfa?
I dey man.
The real question is do you make more money as a RUclipsr or as a Dev?
pretty legit question
yes
The first part gave me enough motivation to continue watching.
I 100% agree. It is not about native vs hybrid or kotlin/swift vs react native/flutter it is about having a common standard for a common app. And after all this time we still do not have that that's what crazy.
2:17 I literally just died over here. Best content of coding history bruh.
I just found this channel and it’s my favorite now.
the main advantage right now with react native is that you have something like expo, which is a godsend. "want to test your app without having to bend the knee and suck apple? no problem bro, here, download this little client on your ios device, log with your expo account and you will see your project currently in dev or on the release channel you want to test, go ahead have fun", "on android too? kay buddy do the same there".
"oh ready to make a build? kk, dont worry bruh, I will build and compile that for you on the cloud, just sit tight I will send you the artifact for the download".
on top of the fact you have release channels where you can tell certain builds to only receive updates from a staging channel, production channel etc, it really raises you up to speed.
Disadvantages however are what you would expect, need to configure that low level shenanigans? want to add a native library that is not currently in the expo managed workflow? good luck buddy, see if you can work around that, if not welp, you can always eject and keep using the channels and the other expo libraries that are compatible with the bare workwflow but now the config and compiling for each platform is on you.
meanwhile in flutter, ionic and others, there is nothing akin to that yet as far as I know. The react community is both a blessing and a curse sometimes.
I've just started app dev and have really been enjoying all the stuff that expo makes easier for newbs like me. However, I can't figure out how to reduce apk size after builds no matter how hard I look.
People tell me to just copy paste sources from the expo project over to a "react-native init" project but how will I get the expo libraries I imported originally without expo? This has been such a headache. Made a simple audio playing app as my first one and it had a bloated 58 MBs apk x_x
@@hououinkyouma5372 there is no way around the size of an app build from expo, that is one of the drawbacks too, all of those are in the documentation.
The app is big because expo by default includes all the binaries and native configs for anything you might need from expo so you can just use expo publish without worry, that also means there might be a lot of code you dont really need so in return you get a really thicc app.
They are aware of such shortcomings and have been saying they are working on trying to customize such behavior to only include what you need and such but yeah, if you really need to shave off that size you would need to eject, and that suggestion they gave you make sense, you can take all your code you have right now and just migrate it to a plain codebase, but it would be easier to just use expo eject, it will give you all the configurations for ios and android and you wont need to track which libraries you need to install again and such.
Of course if either you eject or take the codebase to a react native init one, you still need to check which expo libraries you were using and check if they are avaiable outside the managed workflow. The most common ones are avaiable, at the end of the day, when you use expo install, its just an npm package that makes sure that whatever you might end up installing, is compatible with the expo sdk version you are using, check the eject section in the docs so you can make a well thought decision.
@@arashitempesta Thanks for the advice! I didn't know about the eject option for expo. Will surely look into it. Also, I read on a stackoverflow post that some libraries aren't available through expo and one would need to download them from a simple react native project. If that's true, then wouldn't getting too used to expo be detrimental to one's experience in the long run? Sorry for the questions, I'm just curious 😅
@@hououinkyouma5372 expo install uses npm under the hood, expo install is an utility to make sure that the packages you are downloading are at the correct supported version for your expo sdk. Example, react native webview needs native configurations below, that is why its included in the expo documentation because the expo team included those configs for you so you can use that library if you need it. if the library uses only JS there is no problem.
And the detrimental part well yes, expo abstracts all the configurations you would need to learn, maintain and configure for the platforms you are targeting. Its like create react app, under the hood it configures babel, webpack and such so you can just start coding and set up all the base functionality, if later you need to configure those low level configs, eject and do it but at that point it means you now have to bite the bullet and learn how to do that.
It all comes down to what you need and time, if you can just use expo because it fulfils all your requirements there is nothing wrong with going with it and not bothering learning the platform specific configs. It all comes down to weighting the pros and cons for each option.
Those big companies that have both Android and iOS teams also use React Native because they like to manage three code bases: Swift, Kotlin and React.
This introduction had me rolling 😂
Great video! 🔥
Plz make advance tutorials videos frequently ....
True that
He did a 14 hours video that could have been a two weeks video
@@usmansbk and it probably took him a few months to make.
Love this video, was fun to watch and legitimate advice.
Ben, you’re awesome.
Agree
You can get a mvp for all plataforms much faster with react native
Flutter is really nice now, but there are simply MUCH fewer jobs than React Native. I learned Flutter for fun, and its very impressive, but I'm learning React Native now, for fun, and for the fact that there are lot more jobs that ask for it vs Flutter
I see a new Ben Awad video, I click. It’s simple.
Honestly, If you ask me why people prefer React Native over Java (Android) and Swift (IOS) is because the whole Javascript ecosystem and NPM. Your project gets setup in minutes, you don't have to worry about configuration and there are a lot of open source projects to get the job done!
Is this satire. Someone pinch me
that's called being a simp.
it's kotlin. Java is dead for Android. Also there is kotlin multi-platform and jetpack compose coming up which could replace flutter by another year.
@@SpaceTimeBeing_ I was questioning if his preference for the React ecosystem was satire? What does that have to do with Kotlin or Flutter
what excuse does Kotlin has to not compile the same code into IOS native ?
I would use unity for ultimate platform support, it is technically a game engine but it can render UI really easily and it has great performance.
can u explain more ?
I know you aren't big on design Ben, but I think a video on how you plan and design your full stack projects would be super helpful. Your tutorials are great but you kinda just jump into it and I've always wondered what kind of planning it took to set you up for those. Thanks!
look into software architecture
How about Ionic + React? I'm a filthy Angular dev so Ionic works for my use case, but Ionic announced support for React in around April.
I might be wrong but idk if ionic compiles to native. I think it is all in WebView? Not sure if that changed so in terms of performance not as good as react native
@@RadTwin it's still PWA
@@RadTwin yes its not native, still a webview but way faster than before. In terms of performance, yes, ofc its not as fast as RN but its also extremely easy to make apk or ipa with it
Ionic React is pretty good for most apps :) You can use the exact same code on all platforms (Web, Desktop, iOS, Android) - you don't code share, you use the exact same project for all of them.
Flutter is alright but you need to learn a new framework and language (dart) to work on it, and as you mentioned, no code sharing.
I think the framework is very intuitive. Dart wasn't a problem for me to learn either coming from a JavaScript background. But I still don't really like dart. I would've loved to see Typescript with Flutter.
TLDR: I love Flutter but hate Dart.
@@hagenlens1403 Whats wrong with Dart?
Dart is pretty easy
I like flutter, but hate having to keep in mind the quirks of yet another language. Having to switch my thinking between flutter+dart and react+typescript is very annoying.
I usually stick to Ionic because it's sufficient for most apps.
@@maddada It's strange. I develop back-end with ts, mobile front-end with flutter, and it's easy to switch between them, 'cause they are so similar.
I hear that by end of year, react native will have an update that removes the bridge and Make it almost as fast as native
you got any sources? As a new level flutter dev I'm interested in React instead.
One of your best videos so far (well, I've watched < 10 but still)
Thanks so much for this video, as a beginner of web/app dev, it's really helpful to understand if React is a good choice if one person wants to build for both web/ios/android.
Would love to hear your take on flutter web now!
Angular Dart gonna be a disaster 🤣
This year I will go for JS for sure
Go flutter ,leave it react native :))))
@@indraworks6050 I said JS not react native:))))))))))))
Can’t agree more! Can you make a to tutorial on how to setup IAP with react native?
Lol and this is why you use native
@@jmitchell2464 good point. but after all, i still want to build it with react native. One reason i can't agree more is my website is already using react, so a lot of stuff can be shared (copy and paste) between two.
Used React Native at work to make apps for iOS and Android and I’d say it was a pretty bad experience. I’ve since moved to just native Objective-C.
I'm onto flutter because it's so much easier than Android, ios and react native. But yeah flutter web is not that good neither will be in the foreseeable future. But the mobile app will rapidly evolve to be much more than your site would ever be with web technology I guess. But yeah react native is not awful, I just discovered flutter because first, react native cached my eye because is the first hidrid tech to do something usable for mobile
@Vizman216 What? I've coded 250+ screens, and I never had to write conditions in layouts.
If you're talking about same widgets that look different on iOS and android like in RN - remember, that RN UIs break every time, when underlying widgets change.
@Ben Awad you have full compatability in sharing code with Flutter apps and Flutter Web Apps or even just an web app with a JS library. Dart transpiles to Javascript if you use the correct approaches on your code to be fully dart and not depend on Flutter
Ben, thank you, I'm learning a lot from you
Good points, ionic framework is the future
Idk about your development as a programmer. But as an entertainer... steep AF 👌
His development is great lol
@@nathanielwoodbury2692 I just literally meant I have no clue about it :D
@@nathanielwoodbury2692 his an ok dev. React native over flutter give me a break. He's a dev that refuses to us anything but javascript/typescript - backend, frontend, mobile, driving, walking, skating
maybe you can see his one on one coding online challenge with William candillion, you will realize how sharp he is
@@xacobtrott9204 Yeah exactly, Ben has been coding for a long time and he’s really impressive.
With PWA you can basically download an app to your phone. Could you or someone elaborate more on why you think PWA might be worse way to develop a mobile app than React Native?
more react native content pls
React Native is great for smaller projects where you don’t want to afford too much time. I code apps since 2014 (professionally) and native is still best, of course. But RN is neat to play!
have you used Flutter?
Builds a website to share recipes........Brings up different types of Pasta in every video...........Damn! Ben is making me hungry!!! :D
Hilarious! Thank you for this. And yes, I completely agree.
Great explanation and thanks for speaking up for us react native believers
Wondering what's your take on Flutter now, ~6 months later - Flutter 2 is released with support for Mobile, Web and Desktop (Windows, Mac and Linux).
You should do a follow up video...
Ben is my Person of the Year 2020.
You look so much like Alireza Firouzja, the chess guy
Hey, i love your intermediate level courses on youtube. So, any new course coming in near future?
Clear & Cut Video. Loved Watching it. Understood Everything He Said 👍😁
Can you cover react-native-web? Architecting out a new solution at work currently considering it.
Also looking at how to manage consistency between our product, design and development team. So considering storybooks, already using Figma and I intend to make a UI library. Would be good to see a video on building a UI library.
Hey! You are the guy who created VS Code Stories. Awesome!
Love you man, i like this, greeting from Argentina!!
It needs some extra effort to convert React code into React native, it just making reuse easier. Flutter code can be 100 percent reused for Flutter web without any effort. Also Flutter renders faster than React native because it is not using Android's and iOS' native view containers but still looking exactly like a native app (Disclaimer: I just tried to build apps in material design right now).
any updates how do you like flutter now
Use Blazor so you can C# everywhere
Microsoft now uses React Native to build Window apps and Xbox store apps.
Explains a lot
Yeah! I’ve just known this months ago and this sounds interesting
Microsoft keeps taking steps in right direction
It was my decision.
Im willing to give up some speed and just build an app once. I rather save 5+months plus you can always make React Native faster I think, just needs more development ?
You mentioned React Native's biggest "advantage" is that it uses JavaScript... and that's EXACTLY the reason why I hate it so much 🤣🤣 along the unnecessary "web like" notation for every single freaking component.
Did you try using typescript instead? I think you would love it
What do you think of capacitorjs or Cordova, where you just run your PWA inside of a web view as an app(addressing your issue with PWAs)?
Them dry jokes is what I'm always here for 🤣
I never thought a developer could have a rockstar attitude
Interesting thoughts 🙌.
I know this video is a couple of years old. Flutter has come a long way now.
IMO React native is clunky and does not give consistent behavior across all devices because of the Metro bridge. In some devices, it can be considerably slower. flutter on the other hand has consistence experience. Flutter also has great tooling and development experience. Yes, you cannot share code in Flutter without website. But they can share the same server-side API. There are always going to be some downsides no matter what technology you choose. I don't mind writing extra code for the sake of reliability and performance.
In one word I love you !
1:19 wow shots fired
agree completely with your point, but still go with swift and kotlin route because i just like learning different programming paradigms in general (and i like pain and suffering apparently?)
Flutter is where it's at dawg
It's 2022, can flutter make websites now?
Bro the mechanical arm zuck thing just won you a sub my dude hahahah bravo 10/10
To the point. Care to take a look at flutter for web now and share your opinion? Or too busy with your startup?
As someone just coming to programming his logic makes total sense here.
I think flutter for web could be cool one day. I just don’t like the idea of not being able to use html
Not able to inspect also😂
+ it's on canvas, the last child element is canvas
Needs 3 files to load and then the first content shows up, one file is main.dart and other two are of web assembly for canvas loading
I got addicted to ract-native, im making now a shop book app, and I get to sleep at 03 at night cause i love react-native so much
Hi Ben, if I recently learned the fundamentals of JavaScript what else should I need to learn in order to learn react native? What would you recommend??
Hey bro. You don't need to learn Node.js to start learning React Native. Just learn Fundamentals and ES6 JavaScript. Learn how to use React useState, useEffect hooks at bare minimum .
@@Ivcota i will try that thank you
You can put PWAs on the play store (and hopefully soon on app store)
What are your thoughts on Ionic React / Capacitor?
I’ve had a blast using Ionic and capacitor. Plus it’s much more forward thinking with stencil web components and native wrapper for any platform. Haven’t tried their ci/cd app flow but from what I’ve heard it’s buttery.
Overall, I think this viewpoint makes sense. However, Cordova does still exist as well as Node-Webkit, so other combinations do exist. Also note that to build iOS apps, you will NEED XCode unlike Android dev studio which works on any machine (though I imagine anyone watching this video already knew this).
Point being that you CAN just embed your "app" in a web view and ship it as an "app" if you really want (a la Cordova).
Depends on the need
Thanks. Was really insightful!
if I'm wrong please correct me but you can do tons of stuff with js but you only use dart in flutter. so when choosing between these two. the core language itself should be considerd a factor.
Strange alternative option: use Tauri and write all your native apps in HTML, CSS, and Rust.
Flutter ftw
@@SourceHades How would you make such a framework without OOP? How would you use it without the IDE autocompletions? Functional programming shouldn't be a dogma. It's not the best solution for everything.
@@SourceHades For me it's easier to navigate code structured into classes. I don't know what the advantage of FP is, except forcing immutability to prevent potential errors. The other advantage might be the ability to reuse code easier, but dart supports Mixins very well, so you can have composition instead of inheritance in your classes.
@@SourceHades also, the flip side of immutability is a performance loss and higher memory usage. Duplicating objects is not cheap, it's probably better to mutate their props. (I guess this is not that important in many cases, but still)
@@SourceHades depends how you use them I guess. In my case I just use them to provide generic methods to the main class. I just wish typescript had such a great Mixins support. I don't advocate using them everywhere, but it's a nice tool to have. As far I know, react used to support Mixins pattern, but JS is not a statically typed language and without native support for them, it truly is a mess. I wish TS would implement the Mixins pattern, but doubt it, they don't want to deviate too far from JS.
Ben: It's the best option.
Me (worked on RN, Ionic, Flutter): ah...OK :)
What about using a website disguised as an app, with something like capacitor for native bindings
Your critic of flutter is valid if you are just looking to do a quick port of a website to an app... but generally, I just find that the things the mobile app requires are not exactly the same as the website. Mobile apps have interactions and animations that a website often doesn't have, so you'll have to do a good amount of rewrites either way just on the view side. Business logic is often also on the server if your "business" is easily portable anyway. You'll of course have to do some clientside validation as well. But writing client side validation is pretty quick and easy. if you are in the business of doing more low-level stuff not just validating "business rules" I think flutter is a really good middle-ground. I think RN is cool an all, but I just don't personally find it that useful, its been a while since I've tried it out though, but back in the day, it was just painful. I used to do native development in java and swift, but these days 80% of everything I do is flutter. It's so great. I'm definitely a bit of a flutter fanboy, and I hope flutter for web becomes usable... I hate dealing with CSS and HTML directly😂 Thanks for the content, keep it up!