Beyond native iOS or Android development
For users who want to take their app beyond native iOS or Android development, sources from https://ncreportcards.com/ says, React Native can also be used as a standalone SDK for cross-platform development in XCode or Visual Studio Code respectively. Because of this, it’s possible to build fully native apps that both look and feel like pure natively built programs.
Native app developers have long used abstraction layers to interact with the device hardware in order to provide a smoother user experience. For instance, Android developers can use libraries like Android Layouts to quickly construct user interfaces via XML files rather than writing the UI code from scratch. React Native could be considered similar in concept to Java layouts, except for mobile web apps.
How it works
This diagram illustrates how React Native works:
react-native: This is used to create React Native projects. You can also use other native UI frameworks such as Appcelerator’s Titanium or Ionic just like you would on any other platform.
react: This package contains the React library and associated npm modules, and is required to build and run project components using React Native. It also includes error handling and building tools for development with React Native.
This package allows you to serialize your app’s view hierarchy (including components) into a native binary format, which can be shared between different devices (e.g. a server and a phone) on a single project. This allows you to reuse components by sharing them across platforms. This is useful for testing, versioning, and sharing across different platforms.
react-native-scripts: Provides a set of tools to help you compile and bundle your application along with a downloadable debug version. It can also serve up a live page for testing.
If you’re already familiar with React from working with web applications or other mobile frameworks such as Ionic or Titanium then working with React Native should seem very familiar. The main difference is that it uses native components, but the structure is very similar.
After installing all of your dependencies, you can then run npm start from within the root of the project to confirm that everything has been installed correctly. Once that’s complete, you can then run Android Studio and create a new React Native app by selecting New Project… | Next on the welcome screen. Then select Create New Project with no starter activity and confirm on the next screen. Enter in a package name for your project (e.g. react-native-tutorial) and confirm by pressing OK.