react-tree-template
React component for render JSON tree templates
npm install react-tree-template# or yarn add react-tree-template
Example
;;; const json = "tagName": "h1" "children": "Project" "tagName": "ul" "children": "tagName": "li" "children": "tagName": "a" "attributes": "href": "https://github.com/shoonia/react-tree-template" "children": "GitHub" "tagName": "li" "children": "tagName": "a" "attributes": "href": "https://www.npmjs.com/package/react-tree-template" "children": "npm" ; // Create unique keys for each element// https://reactjs.org/docs/lists-and-keys.htmlconst tree = ; ReactDOM;
output:
Project GitHub npm
Whitelist Tags
Allowed tags
Blacklist Tags
Will be removed with all self children