For example in Android, rather than jumping from activity to activity, RN will create native components in an activity (according to the JS code) when needed, and destroy them when no longer needed.
So essentially, the app will be using native components, resulting in the same performance as a native app. What’s different is that the business logic (which is also written in JS) will be processed by a JS engine, running on a separate thread.
At the time I decided to gear down and seriously invest some time into learning RN, I had never used React (the front end rendering framework upon which RN is based). Here’s a quick start guide on RN from my perspective.
Setting up RN is probably harder than learning it. Follow the installation guide by Facebook to get everything going. Note that if you’re going to be working with Android, Android Studio will, by default download the latest SDK. RN currently supports API level 23 (that’s Android 6.0) so save up on bandwidth and avoid downloading the latest SDK during the Android Studio installation, if that matters to you.
After installing NodeJS, NPM, and the React Native CLI, run the following command to create a new RN project.
react-native init "FirstProject"
An important separation here is that React Native is an NPM dependency of your project, and is different from the React Native build tools which are installed globally on your machine to debug and run React Native projects.
Facebook doesn’t spend a lot of time maintaining the RN docs, and it’s open sourced. Unfortunately, the docs can’t keep up with the speed at which RN is developing. So some parts of the docs don’t stick to ES6+ syntax everywhere, but you should ideally.
Developing simple apps with RN is a breeze. Especially if you’re proficient in modern JS. Adding features that would have taken quite some time in native programming, are now a matter of importing a node module. So things move fast. You know what else moves fast? App build times, live reloading and hot reloading. There are also a lot of other tools like Expo that allow app sharing during development, remote debugging and a lot more features, for free.
If you’re a web dev looking to be a mobile dev (or vice versa), this is a good way to transition. Not recommended for prototype projects that need to be done in a week or two due to the time it takes to set up and get comfortable with the framework. Great for startups, to churn out an iOS and an Android app in half the time it would have otherwise taken.