Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add a section about Expo Modules API #4291

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/native-platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: native-platform
title: Native Platform
---

import BoxLink from '@site/src/theme/BoxLink';

Your application may need access to platform features that aren’t directly available from react-native or one of the hundreds of [third-party libraries](https://reactnative.directory/) maintained by the community. Maybe you want to reuse some existing Objective-C, Swift, Java, Kotlin or C++ code from the JavaScript runtime. Whatever your reason, React Native exposes a powerful set of API to connect your native code to your JavaScript application code.

This guide introduces:
Expand Down Expand Up @@ -30,3 +32,11 @@ These are our deprecated native module and component API. You can still use many
- [Advanced: Custom C++ Types](the-new-architecture/custom-cxx-types.md)
2. Fabric Native Components
- [Android & iOS](fabric-native-components.md)

## Native development with Expo

The **Expo Modules API** takes advantage of modern native language features from Swift and Kotlin, has built-in type conversion and safety, and provides a similar developer experience on each platform, so it's effortless to jump between Android and iOS modules. It has similar performance characteristics to Turbo Modules API because it's built with React Native's JavaScript Interface (JSI).

Expo provides a large set of modules in its libraries and uses the Expo Modules API to create and manage native modules for each. This API only requires a minimal boilerplate when creating a new module.

<BoxLink href="https://docs.expo.dev/modules/get-started/">Continue with Expo Modules API</BoxLink>
10 changes: 10 additions & 0 deletions website/versioned_docs/version-0.76/native-platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ id: native-platform
title: Native Platform
---

import BoxLink from '@site/src/theme/BoxLink';

Your application may need access to platform features that aren’t directly available from react-native or one of the hundreds of [third-party libraries](https://reactnative.directory/) maintained by the community. Maybe you want to reuse some existing Objective-C, Swift, Java, Kotlin or C++ code from the JavaScript runtime. Whatever your reason, React Native exposes a powerful set of API to connect your native code to your JavaScript application code.

This guide introduces:
Expand Down Expand Up @@ -30,3 +32,11 @@ These are our deprecated native module and component API. You can still use many
- [Advanced: Custom C++ Types](the-new-architecture/custom-cxx-types.md)
2. Fabric Native Components
- [Android & iOS](fabric-native-components.md)

## Native development with Expo

Expo provides **Expo Modules API** to write platform and renderer agnostic native modules and views. The API takes advantage of modern native language features from Swift and Kotlin, has built-in type conversion and safety, and provides a similar developer experience between each platform, so it's effortless to jump between Android and iOS modules. It also has similar performance characteristics to Turbo Modules API because it's built with React Native's JavaScript Interface (JSI).

Expo provides a large set of modules in its libraries and uses the Expo Modules API to create and manage native modules for each. This API only requires a minimal boilerplate when creating a new module.

<BoxLink href="https://docs.expo.dev/modules/get-started/">Continue with Expo Modules API</BoxLink>
Loading