1.0.6 • Published 4 years ago

react-native-portals v1.0.6

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
4 years ago

⚛️ react-native-portals

🚀 Install

run

yarn add react-native-portals

or

npm i react-native-portals --save

🪄 Usage

// 1. Create your portal
import { createPortal } from 'react-native-portals';

export const GlobalPortal = createPortal();

// 2. Place the Host inside any component
<GlobalPortal.Host/>

// 3. Just insert your component inside the Site and it will move to the Host
<GlobalPortal.Site>
    <Text>Aloha World!</Text>
</GlobalPortal.Site>