4 ms·
To me react native is the only real way to go if you are considering cross platform development besides using a webview and web stack for your UI. Reason is si
by schr3da 4y ago
To me react native is the only real way to go if you are considering cross platform development besides using a webview and web stack for your UI.
Reason is simple. React Native abstracts only platform away by exposing base components. If you really need something for a specific platform it is very easy to write a custom plugin - so you will need some platform knowledge. I have used flutter as well but must admit it feels not the way as I would like to have - especially the shader compilation if a component gets shown for the first time I feel annoying.
So to me react native is best - but comes with its own pain points like updates...
If you can afford it go pure native and try to write business logic in a shareable language e.g. Rust, C, C++, Kotlin native... and integrate the UI based on the platform.
If thats not an option I recommend react native + if needed custom modules and try to not use too many third party libs.
- andreidd 4y agoYou can do both: two years ago I was looking for the best solution to ship a cross platform app (Android + Windows) and I just couldn’t decide whether to go platform-based UI + a shared C++ core or React Native. I ended up using React Native + a shared C++ core exposed as a RN module. As long as the API surface is narrow (and it is for my use case) this turned out well and it still gives me the possibility to scrap RN at any given time for platform based UIs. Bonus: since most of my logic is C++, I am still able to ship the app using two RN versions: 0.59 for Windows 7 and 0.67 for Android
- 1ark 4y agoXamarin is a good alternative if you don't want the overhead of JS runtime, without going all the way down to the metal as you mentioned. Shared code base. But you sacrifice a bit of productivity for performance and maintainability.
- jurmous 4y agoIn React Native they now use the Hermes engine which can have the JS code precompiled into byte code. https://reactnative.dev/docs/hermes#confirming-hermes-is-in-use https://reactnative.dev/docs/hermes#confirming-hermes-is-in-...
- account-5 4y agoI'm currently looking at a cross platform development technology to learn. I've limited experience all of it with Cordova. I was looking at Dart/Flutter. Is react native much better?
- mhoad 4y agoAlong what metrics is the question. As far as I know it’s: - less popular (https://gist.github.com/tkrotoff/93f5278a4e8df7e5f6928eff98684979 https://gist.github.com/tkrotoff/93f5278a4e8df7e5f6928eff986...) - worse performance - much more frustrating developer experience (inherently subjective but not a particularly controversial opinion) - less supported / actively developed (some very core parts of the RN ecosystem got punted to “community supported” where they basically died in place) but also worth comparing GitHub activity for Flutter https://github.com/flutter/flutter/pulse/monthly https://github.com/flutter/flutter/pulse/monthly and RN https://github.com/facebook/react-native/pulse/monthly https://github.com/facebook/react-native/pulse/monthly I think Flutter is a much better long term bet despite the fact that it’s a much newer project.
- jurmous 4y agoReact Native did a lot of work with the performance issues. They have now their own JS interpreter called Hermes. It also allows your javascript code to be compiled to byte code for better performance. Furthermore their new architecture allows for better integration with native and faster performance. https://reactnative.dev/docs/new-architecture-intro https://reactnative.dev/docs/new-architecture-intro I think a lot of people have their opinions based on an image of React Native in the past. It evolved a lot to be better performant and easier to work with. And for many people the React ecosystem is way more familiar than Dart.
- zigzag312 4y agoDart is compiled to machine code, not just byte code. There's also new rendering engine being worked on for Flutter called Impeller. It's not just React Native that's improving.
- 4y ago