react-functional-portal
v0.1.0
Published
The tiniest react portal implemented with hook.
Downloads
1
Readme
react-functional-portal
The tiniest react portal implemented with hook.
Introduction
This is the tiniest portal implementation. Do any style on its children and leave portal component lightweight.
Installation
Install this package with npm
.
npm i react-functional-portal -s
Usage Pattern
The usage of this package is very intuitive.
import React from 'react';
import Portal from 'react-functional-portal';
const HomePage = (props) => (
<div>
<Portal>
<div>Alert</div>
</Portal>
</div>
);
export default HomePage;
License
MIT © Zhang Kai Yu