react-native-portals
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

⚛️ 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>

Package Sidebar

Install

npm i react-native-portals

Weekly Downloads

1

Version

1.0.6

License

MIT

Unpacked Size

15.8 kB

Total Files

9

Last publish

Collaborators

  • igroza