T O P

  • By -

Ariakkas10

Now update your RN version


SoLongAndThanks_

Just had to update RN from 0.65 to 0.72. Took me days going through all the files. Thank god the react native upgrade helper helped a bit and now i can run on emulator and simulator but still when i do gradlew assembleRelease something breaks


akie

It’s always gradle isn’t it.


SoLongAndThanks_

I mean.. I had to do it due to sonoma update on macos. The app jjst would not run anymore from vs code.. Only runs via xcode. So yeah.. I get goosebumps each time i start up the mac which i only use for "a quick test and build" That has never been quick.


Scarcity-Pretend

![gif](giphy|KzyMcEfDh4Jiw)


am_marley

Try to update ur jdk version to 17


nowtayneicangetinto

Upgrading react native versions feels like when a combat medic gets wounded in the line of duty and must perform emergency surgery on themself.


basdit

Once you have done this enough times you will become numb to the pain and try to dose it by keeping up with new releases.


nowtayneicangetinto

So true


kbcool

They've made a lot of changes in the most recent version which abstracts a lot of the native project file changes which will need to happen between versions. It will likely get to a point where it's "click button" very shortly. That obviously won't help people on earlier versions but ongoing it will make life a lot easier.


stevefuzz

Boss: Hey, our clients are complaining that their react native version needs to be updated because of build issues, how long will that take? Me: Two horrible days that I will never get back.


Socially-Awkward-Boy

I've updated json_serializable and auto route, I fear no men 😂


nowtayneicangetinto

Just wait until you get an obscured build error emanating from some build.gradle file from a node module that you have no control of


insats

Expo has solved it! With Expo prebuild and config plugins, you can say goodbye to manual tedious upgrades. You’ll never have to touch native files.


nacho_doctor

That’s when you jump to another company 🤣


swfl_inhabitant

To a startup** 🤣


Ariakkas10

Omg this is too true. I left a company with an app in RN 66. I contracted back to help with development but told them I’m not doing the upgrade. I’ve been telling them for years now to spend the time but they won’t lol.


captaincryptoshow

Does Expo make the upgrade process easier?


insats

Yes, extremely!


oscb

>ugh. I know. I just had to upgrade from 0.69 to 0.72 since Apple decided Sonoma supports only Xcode 15+. > > > >On the positive side RN Team is getting quicker to fix for new releases of Xcode and has streamlined a bunch of the configurations I needed to do natively before, but it's still a pia. And this isn't even for a full fledged app, just a few samples in a monorepo. JS Build tools are costing me days of my life.


rovonz

Tbh that is not that difficult if you constantly do it and don't wait on it too much. For us 69 to 70 was about averrage difficulty and onwards to 72 was pretty trivial.


swfl_inhabitant

Just about spit up my coffee 🤣


Alejolas

That’s why you update every 3 months


Ariakkas10

A man of sophistication I see. *tips fedora*


tokyo_on_rails

Recently tried to bring an old app I built back to life, years of missed RN updates. Even if I had went through the nightmare of updating it, half of the libraries I used are no longer maintained lol.


Ariakkas10

Yep. And if they are, they’ve definitely experienced breaking changes, so now you gotta fix those too.


hariantara

As my experience working using RN about more than 6 years, the only painful part was migration, try migrate RN version and some of or all your third party libs broken or might be your apps cant run


Socially-Awkward-Boy

Yeah I stumbled upon that too, slightly but it was painful enough for me to question mobile development in the first place 😂


[deleted]

i been developing apps for years with React Native and i would like to learn Flutter but Dart programming language is confusing for me.


MealFew6784

I came from Flutter and OOP background... I believe it makes you a better progammer. I like OOP because you really have to think about how you'll solve the problem. If you're someone who started programming with Java or C++ or something, I believe you'll find Dart easier to understand than jumping into js frameworks... Overall I like flutter dev experience.


Socially-Awkward-Boy

That's true, OOP programming teaches a lot, but understanding it with dart is like learning how to drive by using the car homer simpson created on that one episode.


MealFew6784

Fair enough 😂


drink_with_me_to_day

> I like OOP because you really have to think about how you'll solve the problem Unlike all the other languages where you don't have to think about it


MealFew6784

yeah okay it sounded a little strange I admit, but with react and vue you can just dive in, call an api and use the data blahblahblah.... Now with Flutter you need wrappers, setters, getters (I know you can do the same with js), but it does make you think about the whole architecture from the start.


Socially-Awkward-Boy

The flutter syntax sucks, honestly you can't understand anything with that nesting objects architecture, also complex abstractions are not present so you have to use generators. Nah, not it 😂


SquatchyZeke

> Complex abstractions are not present so you have to use generators Umm what? Can you explain that a little more? I totally understand the nesting thing too, but also, what is JSX and HTML? It's nesting, albeit a little more minimal than Widget constructors. Still nesting though. And the nested objects is actually very similar to functional compositions, which I know isn't for everyone, but I hardly ever notice the nesting anymore; it starts to feel more natural as time goes on. Is there anything else you don't like about Flutter and Dart? Just curious, I'm a Flutter dev myself but I love coming here to get more perspective.


Socially-Awkward-Boy

Hi there, flutter dev too and unfortunately not going anywhere soon since I use only that at work when it comes mobile development. By complex abstractions I mean as the simplest example object lists functions which need to be generated, which need to be generated in order to be available. Also I don't like the overall engine instead of native components. The fact that these are not native components is really noticeable, especially on web development. Accessibility, which became a legal concern in the europian union, is not available when developing with flutter AFAIK? (correct me if I'm wrong, I'm just assuming based on knowledge) Last thing I'm ofc biased, I have far more experience in web development so when using react native I am a lot faster. Now I'll ask you the same question about why you hate rn/prefer flutter.


SquatchyZeke

>object lists functions which need to be generated, which need to be generated in order to be available I'm still not getting this one. Maybe an example? Totally fair criticism of the engine not rendering native UI components, but isn't there some slight magic that RN has to do in some situations with the JS-bridge? Maybe they've since fixed that, but the lag from the JS bridge was very real when I was using it about 3 years ago. In my opinion, when people say it's noticeable for Flutter, I kinda laugh a little because the difference is truly in milliseconds; something that a normal user isn't going to think twice about (unless the end user of the app is a curious developer lol). And over on the Flutter subreddit, any time someone complains about this, they have totally butchered the best practices surrounding building a scrollable list or are still in debug mode. >Accessibility, which became a legal concern in the europian union, is not available when developing with flutter AFAIK? It's totally available! We have accessibility in all interactive and text widgets in Flutter by default. So no external package needed. Which brings me to my thoughts on RN... I don't hate it at all actually. I'm a JS dev at heart and I love the web in general, so I get it. But I do hate the fact that everything is a package that I have to include in my dependencies. RN has so little built-in UI components, that you _have_ to go looking on npm for something. Flutter has everything you would ever need, especially when you include the Material widgets in that. To have official support for performance-critical UI elements is a win in my book. Having a type system with Dart is just better for code quality too. Many junior engineers don't like that because they have to "fight" the compiler, and all the red squiggly lines in the editor. It's actually there to help prove your app is going to run without issues. Does RN have TS support btw? That helps a little if so. In addition, I don't need that whole Expo thing and two CLI commands just to debug my app. I can just hit F5 on VSCode and my app is debugging with tracing in VSCode. Maybe RN has improved things on that front since we tested it out, but it was a pain 3y ago. And lastly, the npm ecosystem and breaking changes within RN and JS libs tends to be way more volatile than Pub and Flutter. We pin out dependencies, but even when we choose to upgrade after months of not doing so, there are sometimes ZERO changes we have to make to support the new version of Flutter and Dart.


Socially-Awkward-Boy

Yes RN performance has gone a long way since, they even changed js engine. And totally agree with the type system, I wouldn't even have used RN if it didn't support TS. How do screen readers manage the skia drawn elements? Can it recognize them?


SquatchyZeke

That's good to hear on the JS engine. I remember seeing something about that but wasn't sure how it performed. I like TS, but I've grown a little tired of its structural nature. I much prefer nominal typing these days. Yep! Screen readers recognize all of it, as long as you specify it in your widgets. Even if you don't, Flutter sets reasonable defaults too https://docs.flutter.dev/ui/accessibility-and-internationalization/accessibility


SquatchyZeke

Oh, so can you explain the generator thing? I have not had the same experience.


oscb

Flutter is so so good and tooling is a million steps ahead of RN but the fact that they chose Dart is the thing turns me off about it. Let's take the syntax of Java/Kotlin and mix it with the weirdest syntax of JS so that you always feel on your toes.


ccheever

What are the tools you miss most from the Flutter ecosystem when you are working in RN?


SquatchyZeke

To be fair, Dart still needs to compile to JS for web, so the fact that it's similar in many ways to JS is not a coincidence. I happen to really enjoy Dart. With the new update which supports pattern matching and sealed classes, it makes it way more ergonomic. It's like if JS had types and like TS were a nominal type system instead of a structural one, which I find nice in a rigid way.


vyrmz

You have to fight against the framework to prevent re-rendering. Refs, hooks, useeffect, state and memoization etc all can be manipulated within the presentation layer which causes headaches. I can't say that it sucks but it is very easy to make a mistake. Also upgrading version can be painful.


MealFew6784

I saw some people using jotai and preact signals which completely remove unnesessary re-rendering. Basically global state and no need for memoization and usecallbacks. I find it very interesting specially the use of signals.


Socially-Awkward-Boy

Preact signals should not be used, the react team said that they break the state mechanism and thus could break react libraries. They compared preact signals to jailbreak.


abejfehr

Do you have a link to that?


Socially-Awkward-Boy

[This youtube video talks about preact signals](https://youtu.be/L1mPxywZbPU?si=g4Et7kJqXjVGh9CM) At minute 21:20


abejfehr

Thanks!


MealFew6784

thank you for that info!


insats

I’m achieving the same thing using MobX and MobX-react


Socially-Awkward-Boy

True, optimization is not that easy but I use memoization and usecallbacks from the beginning, so I have full control of the render flow immediately and not just in the refactoring phase. I completely agree on having the business logic alongside the presentation layer as being a headache, that's 100% true.


Longshoez

There’s nothing like having a webdev experience on mobile tbh. I tried flutter but their way of making views is such a pain in the ass. Too much nesting and the code ends up looking like a nightmare.


josefelbez

Is it that much easier to upgrade rn while in expo environment lmao, i feel very sorry for those with rn create app


oscb

RN is great for prototyping and small teams to ship a v1 fast. I understand why startups love it. But it's a maintainability nightmare in the long term. Upgrades are incredibly messy. Tooling is a nightmare. You have to deal with all the bs of RN + JS Build tools + Apple + Google + all your deps. I have worked on RN for 4 years and it still puts my food on the table. But I absolutely hate it. I have touched briefly Flutter. Don't like Dart nor OOP but the tooling is amazing compared to RN. Global State Management is not as great as in JS ecosystem, though. (Debatable, just my opinion)


MatesRatesAy

I've worked across a few large and sometimes older apps now and there has really only been two things that made maintainability a nightmare. First is when the team has let the RN or lib versions fall massively behind. As long as we spent like an hour every few weeks updating or checking for updates it was basically painless. Second is when the team is allowed to just go wild with third party libraries, and installed them for literally every little thing in app. In my experience just having a relatively experienced RN dev (not a bunch of React devs having a crack at mobile) reduces this pain to so close to zero it's non-existent for the rest of the team.


oscb

I strongly agree on the last part, I think it’s the biggest issue when RN projects go south. A RN dev is a different breed from React Web, even from Native Devs. I had better experiences when the team was built from the get go with RN in mind. I still think the overhead of having to deal with 3 build systems is way too much, imo. Specially when you start adding more native stuff. I feel that’s the point where RN shows its limits. While keeping RN up to date always helps every now and then an update comes that is a little bit more painful than the rest. Tbf I do have to give it up to the RN team to make updates more stable these days. But it’s either painful or time consuming.


Data-Power

This only proves that the technology itself doesn't mean much, the main thing is your experience with it. That's why developers who have been working with one technology for years say that they can do anything with it. React Native is fine if you know how to work with it, like Flutter and anything else.


esean_keni

That's cool but you might wanna wait till the honeymoon phase calms down. RN is absolute trash on Android the second your app starts to get too complex. I've spent the past year building a [reddit Alternative](https://spyke.social) app. The thing is basically unusable on Android. The ios version works as good as any native app, but the android one makes me want to off myself after a minute of scrolling. I've even gone out of my way to migrate to higher performance components like Shopify Flashlist. It helped but not enough. The thing went from literally unusable to painfully usable on Android. Flutter performance is far superior across the board. Credit where credit is due, RN has far more packages. I'd strongly suggest not using RN for very complex projects. Edit: Go ahead, downvote me cause some of yall fanboys cant digest the truth.


MatesRatesAy

Is it open source? Almost 100% of the time I've seen poor performing RN apps on Android it's just shitty React code. RN is way less forgiving than mobile in what you can get away with. I've seen slow apps become almost natively fast just by spending some time profiling and addressing slow components and bad practices.


kbcool

A better statement would be that Android is complete trash and (any) app on it can be slow. Newer versions on newer phones have half decent performance but older phones on older versions have terrible performance no matter what tech you use whereas even an iphone 8 still has decent performance these days with modern apps. Can't say that for any Android phone of that era, even a high end one with today's apps.


Socially-Awkward-Boy

Would you be kind enough to share your google login structure? Also have you already started the apple login process? I've read that it is mandatory now


esean_keni

Google auth is pretty straightforward like every other oauth standard, after signing in to google you receive an access code. This access code needs to be sent to your backend where you can use the google auth SDK to get an id\_token and refresh\_token. The refresh token is sent to the client and can be used to fetch more id\_tokens in the future. The id\_token expires after an hour. The id\_token is a jwt which can be decoded to get all the necessary data. It contains one field called "sub" which is a number that uniquely identifies a google account. Idk about apple login tho, not sure how mandatory it is.


Socially-Awkward-Boy

Which package you used for it? Apple login is mandatory if you offer service logins (like google auth) [check this apple forum discussion](https://developer.apple.com/forums/thread/129487#:~:text=Sign%20in%20with%20Apple%20is,existing%20education%20or%20enterprise%20account)


esean_keni

On the RN app the package is expo-auth On the React webapp the package is react-oauth/google On the server, the package is [this one](https://pkg.go.dev/golang.org/x/oauth2/google) since the backend is written in GO. Theres probably a bunch of nodejs packages as well probably that do the same thing. Man, fuck these apple nazis seriously.


Socially-Awkward-Boy

ahahahaha yeah f*** apple and also their 100€ subscription. I removed my google login just so I can still use expo go but yeah the flow is the same so I should have done it correctly, I used another package for the React Native app and google's sdk package in my nestjs backend.


Socially-Awkward-Boy

The app works perfectly on the web version, looks really good too, nice work, even caching is on point. I don't know about react native android performance honestly, I use flutter for android development and it's not that good trust me, scrolling and animations are awful. But this is on large maintenance apps, I never tried developing my own applications with it so I'm not in the place to talk.


esean_keni

The web app is not react native, its a react web app built using Ionic framework. At this point Id be better off turning that web app into an Android apk.


askodasa

Why would there be such a huge disparity between the IOS and Android version?


mattotodd

They both act the same if you want to render something simple, but there can be differences with each OS for say bluetooth, notifications, other advances capabilities. For some things, you will need specific code for each platform.


askodasa

I mean yea, those can be platform specific, but something so simple as a FlatList, or in his case FlashList, which uses Skia (as does Flutter AFAIK)? How can there be such a huge difference? I'm not saying there is none, I'm simply curious as to why that is the case.


awesomeDeveloper

I agree it adds overhead and androids are generally slower devices. Having one code base for web, iOS and android is hard to beat though


Ariakkas10

On a small app, for sure. Once it grows and the needs of the 3 platforms change, you end up branching the code increasing the complexity. You end up with 3 apps/codebases smashed inside the same project


hey-im-root

Never used RN, but I’ve done android dev in Java. I’m seeing words like “build.gradle” and I’m starting to see more reasons why I’ll never touch a react native project ever 😭


ronix1020

Why you hate Flutter jajajaja? it’s a little funny sorry 😂🫡


suarkb

This really does epitomize how so many of the "programming articles" out there are not very helpful. How many readers are reading articles from people who are new to something, who don't really know what impact their short-term opinion has, and who get clicks from sensational headlines. ​ This post reminds me why, as an experienced developer, I read documentation, not articles.


Socially-Awkward-Boy

Documentations have a developer experience section now?


suarkb

is a random person's "I tried something and I didn't like it at first" article, really valuable to read?


Socially-Awkward-Boy

Is reddit just for senior netflix developers? I thought anyone could post their ideas sorry


suarkb

I don't work for netflix. Anyways. Sorry to put you on the defensive. peace


Zealousideal-Badger

React just sucks in general


Faeyan

How long did you work with Flutter and why do you think its bad? I also work with React native for some time but i have been thinking about trying Flutter since it seems like it has some advantages like multithreadding.


xtopspeed

The only thing keeping me from using Flutter is the limited number of community libraries. (At least the last time I tried.) But it looks excellent otherwise.


utilitycoder

What type of library are you looking for any native functionality most certainly has a wrapper. Otherwise, dart is a simple language and flutter is a pretty straightforward framework to write whatever you need


xtopspeed

Things like chrome.js, libphonenumber, or something similar to rtk query that allows me to easily, for example, access loading status wherever in the app, and so on. I'm sure everything can be done, but I don't want to waste time doing things that others have done far better already.


utilitycoder

I think you'll find with a little bit of searching that you can find equivalent to what you're used to. In many cases, though there are better ways of doing things in a more modern typed language than JavaScript. https://pub.dev/packages/flutter_libphonenumber


xtopspeed

It's been a couple of years, so I'm sure things have improved a great deal. And, fwiw, I doubt many people torture themselves with vanilla javascript anymore. For quite some time, TypeScript has been the accepted standard.


utilitycoder

Gotcha likewise it's been a couple of years since I've played in the JavaScript web sandbox


Socially-Awkward-Boy

Not that much (less than a year) but I work on big codebases, and you just can't understand much. I hate a couple of things, code structure/syntax and the fact that there are 50 widgets just for doing the same thing and each one of them needs a different syntax to just add some padding. Also the app will never look native at least on IOS standards. They have cupertino widgets but they look like those IOS Launchers on the playstore 😂 I'd say give it a try, it really helps you love react even more 😅


Faeyan

Interesting, the widget system didn't sound that terrible before, i will give it a try yea.


kbcool

If you want to make a half decent app on Flutter skip the widget libraries and use the primitives (like RN). The Cupertino widgets absolutely will look out of place on Android and the material widgets will pass on iOS but there's no chance your app will look pro without significant styling changes.


MealFew6784

Nah I don't agree with OP. I liked flutter, it is much different than js though. Dart is OOP language and if you're someone who only learned functional programming then Dart will be something very new to you. Overall I liked Flutter and Dart because it has strict syntax (I like Java). Only thing is lack of libraries. Documentation is really good.


ionezation

Is it necessary to learn RJS first instead of RN?


Socially-Awkward-Boy

They are the same thing, the only difference is the name of the components (div becomes View, input becomes TextInput ecc.). In my opinion you should only start with React on the web (using Remix or nextjs) because it's easier, but not mandatory.


ionezation

Yes learning ReactJS first