@jswork/next-tree-walk
v1.0.7
Published
Tree data walker.
Downloads
30
Readme
next-tree-walk
Tree data walker.
installation
npm install -S @jswork/next-tree-walk
usage
import '@jswork/next-tree-walk';
class MyComponent extends React.Component{
get childView(){
const { items, itemsKey, template } = this.props;
return nx.treeWalk(items, { template, itemsKey: 'children' });
}
render(){
return (
<div>
{this.childView}
</div>
)
}
}
license
Code released under the MIT license.