Render a component anywhere. Anything inside a <Portal>
component will be rendered on an ancestor <Portal.Host>
component.
npm i --save @burstware/react-native-portal
import React from 'react'
import { Text, View } from 'react-native'
import Portal from '@burstware/react-native-portal'
export default function (props) {
return (
<Portal.Host>
<View>
<Text>Background Text</Text>
<Portal>
<View style={styles.smallParent}>
<Text>portal parent view</Text>
<View>
<Text>This should be on top</Text>
</View>
</Portal>
</View>
</View>
</Portal.Host>
)
}
Based on Portal implementation in React Native Paper