Portals for Rect Native and React Dom
npm i opium-portals
import { PortalsProvider } from 'opium-portals'
const App = () => <PortalsProvider>
Place your app here.
All portals will be placed right after your app.
</PortalsProvider>
import { PortalsProvider } from 'opium-portals'
// This component will wrap every portal
const Wrapper = ({children}) => children
const App = () => <PortalsProvider Wrapper={Wrapper}>
Place your app here.
All portals will be placed right after your app.
</PortalsProvider>
import { Portal } from 'opium-portals'
const MyComponent = () => <Portal>
Your code here
</Portal>
import { withPortal } from 'opium-portals'
const MyComponent = withPortal(() => 'Your code here')
to call your component inside the portal, use inPortal
prop
<MyComponent inPortal >