Skip to main content

Installation

Adding a library to the project

Install the react-native-teleport package in your React Native project.

yarn add react-native-teleport

Linking

This package supports autolinking.

Pods update

After adding the package don't forget to re-install pods and re-assemble android and ios applications, since this library contains native code.

If you still experience issues like package doesn't seem to be linked try performing a fresh build to clear any outdated cache.

Adding provider

In order to use it you'll need to wrap your app with PortalProvider component.

import { PortalProvider } from "react-native-teleport";

export default function App() {
return (
<PortalProvider>
{/* your main application code goes here */}
</PortalProvider>
);
}

Congratulations! 🎉 You've just finished installation process. Go to the next section to get more insights of what you can do using this library. 😎