Portal.Host

Portal host renders all of its children Portal elements. For example, you can wrap a screen in Portal.Host to render items above the screen. If you're using the Provider component, it already includes Portal.Host.

Usage

import * as React from 'react';
import { Text } from 'react-native';
import { Portal } from 'react-native-paper';

export default class MyComponent extends React.Component {
  render() {
    return (
      <Portal.Host>
        <Text>Content of the app</Text>
      </Portal.Host>
    );
  }
}

Here any Portal elements under <App /> are rendered alongside <App /> and will appear above <App /> like a Modal.

Props

children (required)
Type: React.Node