Live data from Hacker News

React Native made me give up a project today

news.ycombinator.com

21–30 of 83 posts

Re: React Native made me give up a project today

#22
> Just installing it is now a walk through a minefield of errors - is your mac an M1? There are dozens of different recipes to follow for a maddening mix of how to install different versions of ruby, of cocoapods, with homebrew or not, with the arm terminal or rosetta emulator.

honestly, to me it sounds like you have moved over an old environment from years of upgrades, instead of starting fresh on an M1. You're just in edge case hell, and there's no way out if you weren't using segregated environments.

trust me when I'd say it would be faster to start over. when you need your special configurations or PATH variables, you'll find them that one time you need them.

Re: React Native made me give up a project today

#23
post #15
post #8

Why give up after all that effort?

> “Why give up after all that effort?” Because the speed of iteration in JS-framework-land is so fast that if you take more than a week or two setting up your dev environment your dependencies are already out of date and insecure, and the half of them that are using “require” instead of “import” stopped working with another library you depend on. Then, when you reported that, the maintainer replied to the GH issue, “…

> Then, when you reported that, the maintainer replied to the GH issue, “modern browsers and Node releases have supported ESM loading for _ages_, like months and months before I started being a dev in 2018 so trust me, it’s stable now.”

Try this line with D3 :-) The maintainer, Mike Bostock, has been a developer since before Node and its commonjs modules. He dropped support of commonjs since d3 version 7, about a year and a half ago.

Re: React Native made me give up a project today

#24

Getting React Native setup can be a bit of a pain, but I found the transition to M1 completely painless. You just use homebrew for things like Ruby and Cocoapods (the ARM version, but there is no special configuration required - that's what you get by default). One thing you do generally need to do with React Native is make sure that you're on a relatively recent version of dependencies. If you're revisiting an old p…

Mind you, old versions of Expo really aren't something you would like to use if you're getting back to it like right now; Expo's 3-monthly (I think?) release cycle, and their 3 major versions support policy make it quite hard to deal with, for example if you rely on things like Expo Go. If you had an Expo project as recent as Expo 43 and are just maintaining it today, you won't even be able to test it out on Expo Go (on device that is; their old versions of simulator clients are here https://api.expo.dev/v2/versions/latest), support being dropped already.

Especially now is a bad time to claim that Expo makes transitioning painless - Expo is under major transition to their new EAS services (and old Expo updates are going to be dropped permanently in 2 months) and support for the new React Native Architecture is significantly changing their build process.

I would agree that before Expo's recent major changes (which I applaud), upgrades have generally been quite smooth.

Thankfully, the latest Expo versions seem to allow much more flexibility in the build process, making it much more viable for me to do my own Expo builds and stay mostly intact from Expo's support cycles.

Re: React Native made me give up a project today

#25
post #20

> React Native is great; React Native firebase is great; Firebase is great; Apple is great. Forgive me for saying this, but the fact that you started with that line makes it sound like you might have some Stockholm Syndrome (or perhaps Sunk Cost Fallacy is more appropriate here). Because what you wrote afterwards makes it clear that at least some of the parts that you mentioned afterwards are in fact not great.

Once everything is setup and builds are working, it's pretty great. Being able to write react components in a mobile app is quite the productivity booster.

However, the infra surrounding getting that to work is quite the burden and one could argue that it isn't worth it, but at the end of the day that's a metric that can be measured and judged by the developers.

Re: React Native made me give up a project today

#26
Ruby, Cocoapods, Homebrew are not React Native problems, they are Apple problems. They ship an OS without a development friendly package management system. Their entire toolchain has no way to manage libs/packages which led to the creation of Homebrew + Cocoapods. Apple also does not allow iOS development on other OS where package management is much better. Apple now also has added the extra complexity of a new CPU architecture which only they control.

Then you add Android to the mix, it does not get better. RN is just trying to solve the multi-platform mobile app development, it cannot solve how Apple chooses to dictate build / release of their applications.

Re: React Native made me give up a project today

#28
If you like the React style approach but want something a bit more self-contained, why not check out SwiftUI? Alternatively for Android, Jetpack Compose? Both toolkits are similar in style to React.

If you're feeling brave (I guess not today) you could also try a Kotlin Multiplatform app, which lets you share code between Android, iOS and desktop or even use Jetpack Compose on iOS (but that's a road less travelled because you don't get fully native UI that way).

Re: React Native made me give up a project today

#30

That's one of the big reasons why I've been Nixifying my React Native projects, and gradually it seems to be working out. A number of projects seem to be starting to do something like that as well, like status-im, and occasionally I find their configs helpful. By itself, Nix doesn't help with the M1 React Native problems, but with fastlane, Ruby, cocoapods, things really nicely just worked, and once I've figured ever…

Yes and no.

I mean, I think this is absolutely the killer feature of Nix (even above the more accessible asdf, since Nix will also provide native libraries); it's really nice to get a development environment which will Just Work. (OP's frustration isn't unusual).

On the other hand, Nix doesn't make problems disappear; and can require having a deep understanding of what the problem encountered is. OP ran into problems trying to get a project which had worked on (presumably) x86_64 macOS, but didn't work on M1.

Post reply on HN