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