React Node Position
Highlights
Quick Start
Installation
$ npm i @trbl/react-node-position
$
$ yarn add @trbl/react-node-position
Composition
import React from 'react';
import { NodePositionProvider, withNodePosition } from '@trbl/react-node-position';
const WithNodePosition = withNodePosition(forwardRef({ nodePosition }, ref) => <div ref={ref}>{nodePosition}</div>));
const App = () => (
<NodePositionProvider>
<WithNodePosition />>
</NodePositionProvider>
)
export default App;
For working examples, see the demo app.
Demo
$ git clone git@github.com:trouble/react-node-position.git
$ yarn
$ yarn dev
$ open http://localhost:3000
API
Contribution
Help us, or let us help you help us.
License
MIT Copyright (c) TRBL, LLC