In React Native, there are certain third-party components which compile their own libraries that can be included in your main React project. Examples of such third-party lib
Take a look at the official Facebook guide Native Modules Setup. It explains how to start:
$ yarn global add create-react-native-module
$ create-react-native-module MyLibrary
This will generate a README.md with next steps as follows:
react-native-my-library
Getting started
$ npm install react-native-my-library --saveMostly automatic installation
$ react-native link react-native-my-libraryUsage
import my-library from 'react-native-my-library'; // TODO: What to do with the module? my-library;