React Native is a separate framework from React, built to employ the same code design patterns that React uses on the web to native mobile apps. It includes the React library itself, and much of the exact same code can be shared between React web apps and React Native apps. However, there are a few significant differences.
The biggest difference is that React Native does not render HTML or CSS. Both React and React Native use a syntax called JSX, which is designed to easily incorporate JavaScript (which executes dynamic logic in the app, based on data and user input) with markup code (code that does not execute logic, but simply represents an organization of visual information). However, React on the web uses normal HTML and CSS in its implementation of JSX, which means that laying out and styling the user interface (choosing colors, fonts, margins, etc) is exactly the same as any other web framework. React Native, however, implements its own version of native mobile components and styles. These are derived from HTML and CSS, but are based in pure JavaScript, and do not support all of the features that web developers can access.
React Native's styling options are notable in that they are based almost entirely on the Flexbox CSS model. This is well-suited to mobile displays, which vary in size and require UI design that can fill space dynamically. But it does mean that web developers who are used to using css-grid, for example, will need to learn a new paradigm for laying out views if they migrate to React Native.
React Native also requires a different navigation approach than a React web app, as the user is not making HTTP requests for each page as they would on the web. There are several libraries available to handle navigation in a React Native app, but the most popular (and the one linked directly from the React Native documentation) is React Navigation. It is a well-maintained and full-featured tool that mimics the native navigation features of iOS in Android, but entirely within JavaScript, giving developers a great deal of control over the structure of their apps.
Despite these differences, React and React Native share a common foundation in their component-based architecture. This allows developers to break down their UI into smaller, reusable components that can be easily shared among different parts of an application or even among different applications. This can be particularly helpful for code sharing and for maintaining consistency across platforms.
In terms of performance optimization and API integration, React Native offers a number of tools and libraries that are specifically designed for mobile app development. For example, React Native CLI provides command-line tools for building, running, and debugging React Native applications, while Expo provides a number of pre-built components and libraries for common tasks like image loading and push notifications. Overall, React Native provides a powerful and flexible framework for building high-quality native mobile apps with a focus on developer productivity and code reuse.