Ask HN: Native vs. React Native vs. Flutter
I am planning the plunge into app development. I have a startup idea and wish to prototype it (Mobile app is the biggest part) and i thought it would better not to outsource it.
I was planning to go with React Native as i have some Javascript experience and for the fast development, cross-platform aspect. But since app is a major part of my idea (Think something like Coursera targeted for mobile), I'm skeptical on compromising on performance issues from what I've heard people blaming React Native for (Not so butter smooth transitions, e.t.c).
What platform would you suggest and any advice?
4 comments
[ 4.1 ms ] story [ 16.2 ms ] threadFor example, rather than using https://reactnavigation.org for navigation, consider using something like https://wix.github.io/react-native-navigation since all screen transitions are native.
Combine this with the power of Firebase, you can use https://rnfirebase.io and you'll have an app up and running in no-time.
To choose between native and react-native, list the functionality that your app will have, and see if react-native has good support for it. If it doesn’t, you will have to write native code for both platforms and add it yourself.
This adds a ton of learning to the equation and makes the choice less clear, since now you have to learn react-native, plus some swift and Java. If more than a small part of your app ends up requiring to write native code, you might be better off making the whole apps in Swift and Java.
React native is very efficient for apps that show simple widgets like images, texts, lists, buttons, etc. You also have good support for playing video (I assume you’ll need it since you mention coursera-like content).
Some advice if you pick that route: - Don’t be fooled by it’s simplicity. You can make an app in hours, but if it’s non trivial you will require more time to really polish it - React code can get messy fast, it’s easy to lose track of where state changes happen. Choosing a well known architecture and sticking with it (ex: redux) is super helpful as complexity grows - to get to 60fps, you need to be very precise on how and when to make state/U.I updates, so the optimization phase can take a while. I often end up going through all components in a tree to manually disable un-necessary re-renders, or delay re-rendering after some animation has completed. - don’t use react-router, it’s not suited for native needs (it keeps all previous views from the stack active which creates all sorts of problems)
Compared to learning two languages for making an iOS and Android app, react native is incredibly fast and efficient, especially when you come from the web. If your app doesn’t require native modules, go for it.
Source: spent the past year leading development of a react native app with 2M monthly users.