Ask HN: Please provide your opinion on the state of React Native in 2023
The last time I used React Native, I didn't have a great experience maintaining the app. But it was 3 years back. Could you please provide your opinion if you have recently worked on developing or maintaining a React Native project. Suggest other alternatives if you had better experience.
30 comments
[ 2.7 ms ] story [ 82.4 ms ] threadsometimes you have to go native if you need it.
personally i despise mobile stuff. i find it hard to catch up on yearly changes compared to building web apps.
but there are people who got rich in buildig mobile apps. there is money there. i just dont love the developer experience.
Sure sometimes it can be frustrating, but to me is ok if your company is small and can't hire too many people in order to maintain two fully native projects.
If you are writing a B2B app where the customer wants to forcibly install it on people’s personal phones, the cross platform is important.
In most other cases, just write it in swift, 95% of profitable customers have iphones.
Maybe in the US... This works for hobbyists or single devs, but clearly isn't realistic for most companies.
I use it, mostly with expo. Everything works out of the box and performance is actually surprising (because of Hermes engine), I'd say its a lot better than all other alternatives when it comes to cross platform development solution, simply because flutter is the only real competitor and flutter has few problems that makes it unbearable for me:
1) lots of copy-paste boilerplate code 2) ios apps behave weirdly in flutter (maybe they still havent fixed 1 frame lag with touch/swipe/scroll events? idk) 3) they're not using native components but implementing them on canvas. This sounds extremely prone to issues and bugs and requires them to catch up to update stuff once platform holders change something in their UI kits.
If I had to pick a tech right now, I'd go
React Native -> Jetpack Compose/Swift UI -> Flutter -> Anything else
Every native UI draws on canvas. So, drawing on canvas is technically as bug prone as a native UI.
Also, nothing breaks when platform holders change something in their UI kits, because Flutter is not using their UI kit (except of few fundamental things). Components continue to behave and look exactly as they did before.
If you want to mimic new design/behavior of platform's native components after an OS update, Flutter widgets need to be updated independently.
iOS in particular uses a lot of animations for context clues, and it is very hard to get right when you try to copy it.
There’s also a lot of functionality that is baked into native controls, such as accessibility and localization that are often missing from canvas drawn controls.
Expo has a new system that’s in beta that should make doing this much, much simpler (check out expo-modules).
Don't get me wrong, there are a few essential things that you have to mimic in order not to be too alien on a specific platform. But for everything else, try to provide best UI/UX for a specific task rather than trying to mimic some generic controls.
Making a good UI framework from scratch takes considerable amount of resources. The lack of accessibility and localization is usually due to insufficient resources from framework developers, not a technical limitation.
I'd be wary of using it for a really large project though, because of a) Dart and b) Google so it might die in the future. It also changes a lot, so be prepared for dev time if you're only updating the app every year or so.
Having no previous experience with RN, I wrote and released an iOS and Android app using Expo and their free hosted build system.
Yes it has some quirks and you should ensure plugins/modules can provide the functionality you need, but for me, from 0 to 100 (app idea to app store) it was easy.
Also, RN doesn't handle cross-platform automatic text or image sizing well, which was the biggest hurdle to making things look ok on Android.
Libraries that handle basic features like geolocation or the clipboard have been spun out of the main org, and the result is even worse reliability. Core features are also often superseded by libraries that are in a constant state of refactoring like Reanimated or React Router.
On the bright side, performance, memory usage and startup times have steadily improved so it’s possible to build apps that perform almost indistinguishably from native ones (at great human cost!).
Thankfully we have the budget to work with expert maintainers and sponsor external libraries which allows us to reduce some of the pain.
Here are the results: https://results.stateofreactnative.com/
My personal biased opinion: React-Native is awesome and keeps improving.