0.1.1 • Published 6 years ago

react-portal-decorator v0.1.1

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

react-portal-decorator

CircleCI

npm install --save react-portal-decorator
import React, { Component } from 'react';
import inPortal from 'react-portal-decorator';

@inPortal('render-div-id')
class MyComponent extends Component {
	return (
		<div>
			Hello, world!
			<br />
			This will be in the div '#render-div-id'
		</div>
	);
}

The decorator works by creating a higher-order component that renders your component into a div with the id specified when calling the decorator

0.1.1

6 years ago

0.1.0

6 years ago

0.0.1

6 years ago