react-bulkhead
v2.1.2
Published
React component to allow 3rd party components to operate over DOM-tree (d3, three.js)
Downloads
16
Maintainers
Readme
react-bulkhead
React component to allow 3rd party components to operate over DOM-tree (d3, three.js)
Installation
NPM
npm install --save react react-bulkhead
Don't forget to manually install peer dependencies (react
) if you use npm@3.
1998 Script Tag:
<script src="https://unpkg.com/react/dist/react.min.js"></script>
<script src="https://unpkg.com/react-bulkhead/build/react-bulkhead.min.js"></script>
(Module exposed as `ReactBulkhead`)
Demo
http://nkbt.github.io/react-bulkhead
Codepen demo
https://codepen.io/nkbt/pen/RVYrwN
Usage
import React from 'react';
import ReactDOM from 'react-dom';
import {ReactBulkhead} from 'react-bulkhead';
const onCreate = ({element}) => {
element.innerHTML = 'Gotcha! Mutable DOM here';
};
const App = () => (
<div>
<ReactBulkhead onCreate={onCreate} />
</div>
);
const appRoot = document.createElement('div');
document.body.appendChild(appRoot);
ReactDOM.render(<App />, appRoot);
Options
// TODO
License
MIT