react-portal-simpler

0.1.0 • Public • Published

React Portal Simpler

Just appends React Component to the document.body, Nothing more

Hot to use

$npm install --save react-portal-simpler
import Portal from 'react-portal-simpler';

...

render() {
  return(
    <Portal className="sample">
      <div>
        <p>Child elements such as Overlay or Modal or Whatever you want.</p>
      </div>
    </Portal>
  );
}

Will return this

<body>
  ...
  <div id="react-root"></div>
  ...
  <div class="sample">
    <div>
      <p>Child elements such as Overlay or Modal or Whatever you want.</p>
    </div>
  </div>
</body>

Props

Prop Type Required
children element Yes
classNames string No

Readme

Keywords

none

Package Sidebar

Install

npm i react-portal-simpler

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • vwxyutarooo