0.1.0 • Published 5 years ago

react-functional-portal v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

react-functional-portal

NPM version Build Status Test Coverage Dependency Status DevDependency Status License PR Welcome

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