react-json-tree-viewer
react-json-tree-viewer
Usage
const json = array: 1 2 3 bool: true object: foo: 'bar' <Rjv data=json />
Result
Props
Name | Type | Default | Description |
---|---|---|---|
data | object/array | {} | json data |
hideRoot | boolean | false | if show root |
shouldExpandNode | (path: string[], data: any) => boolean | null | if expand object or array in first render |
onArrowClick | (path: string[], expanded: boolean) => void | null | hanle arrow click |
labelRenderer | (keyName: string) => JSX.Element | null | custom render label |
valueRenderer | (data: any) => JSX.Element | null | custom render value |
typeRenderer | (data: any) => JSX.Element | null | custom type laber |
arrowStyle | React css Properties | null | custom arrow style |