• Version 0.15.0
  • Published
  • 581 kB
  • 3 dependencies
  • MIT license


npm i react-json-tree
yarn add react-json-tree
pnpm add react-json-tree


React JSON Viewer Component, Extracted from redux-devtools



class JSONTree

class JSONTree extends React.Component<Props, State> {}


    constructor(props: Props);

      property defaultProps

      static defaultProps: {
      shouldExpandNode: (
      keyPath: (string | number)[],
      data: any,
      level: number
      ) => boolean;
      hideRoot: boolean;
      keyPath: string[];
      getItemString: (
      type: string,
      data: any,
      itemType: any,
      itemString: string
      ) => any;
      labelRenderer: ([label]: (string | number)[]) => any;
      valueRenderer: (value: any) => any;
      postprocessValue: (value: any) => any;
      isCustomNode: () => boolean;
      collectionLimit: number;
      invertTheme: boolean;

        property propTypes

        static propTypes: {
        data: any;
        hideRoot: any;
        theme: any;
        invertTheme: any;
        keyPath: any;
        postprocessValue: any;
        sortObjectKeys: any;

          method render

          render: () => any;

            method shouldComponentUpdate

            shouldComponentUpdate: (nextProps: Props) => boolean;

              method UNSAFE_componentWillReceiveProps

              UNSAFE_componentWillReceiveProps: (nextProps: Props) => void;

                Package Files (1)

                Dependencies (3)

                Dev Dependencies (4)

                Peer Dependencies (2)


                To add a badge like this badgeto your package's README, use the codes available below.

                You may also use to create a custom badge linking to

                • Markdown
                • HTML
                  <a href=""><img src="" alt=""></a>