import * as React from 'react' import { Portal } from './Portal' export class Modal extends React.Component { constructor () { super(...arguments) this.state = { opened: false } } open = () => { this.setState({ opened: true }) } close = () => { this.setState({ opened: false }) } render () { return ( {this.state.opened && (

This modal is rendered using{' '} portals.

)}
) } }