Skip to content

Instantly share code, notes, and snippets.

@chebotiuk
chebotiuk / Portal.js
Created December 14, 2017 14:24 — forked from bisubus/Portal.js
React 16: Portal
import React from "react";
import PropTypes from "prop-types";
import { createPortal } from "react-dom";
class Portal extends React.Component {
static propTypes = {
children: PropTypes.node,
};
state = { mounted: false };