Portal

Portal allows to render a component at a different place in the parent tree. You can use it to render content which should appear above other elements, similar to Modal. It requires a Portal.Host component to be rendered somewhere in the parent tree.

Usage

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

export default class MyComponent extends React.Component {
  render() {
    return (
      <Portal>
        <Text>This is rendered at a different place</Text>
      </Portal>
    );
  }
}

Props

children (required)
Type: React.Node

Content of the Portal.

theme
Type: Theme

Static properties

These properties can be accessed on Portal by using the dot notation, e.g. Portal.Host.