react-json-tree

  • Version 0.17.0
  • Published
  • 480 kB
  • 5 dependencies
  • MIT license

Install

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

Overview

React JSON Viewer Component, Extracted from redux-devtools

Index

Classes

class JSONTree

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

    constructor

    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: React.ReactNode,
      itemString: string
      ) => JSX.Element;
      labelRenderer: ([label]: (string | number)[]) => JSX.Element;
      valueRenderer: (value: any) => any;
      postprocessValue: (value: any) => any;
      isCustomNode: () => boolean;
      collectionLimit: number;
      invertTheme: boolean;
      };

        property propTypes

        static propTypes: {
        data: PropTypes.Requireable<any>;
        hideRoot: PropTypes.Requireable<boolean>;
        theme: PropTypes.Requireable<string | object>;
        invertTheme: PropTypes.Requireable<boolean>;
        keyPath: PropTypes.Requireable<(string | number)[]>;
        postprocessValue: PropTypes.Requireable<(...args: any[]) => any>;
        sortObjectKeys: PropTypes.Requireable<boolean | ((...args: any[]) => any)>;
        };

          method render

          render: () => JSX.Element;

            method shouldComponentUpdate

            shouldComponentUpdate: (nextProps: Props) => boolean;

              method UNSAFE_componentWillReceiveProps

              UNSAFE_componentWillReceiveProps: (nextProps: Props) => void;

                Package Files (1)

                Dependencies (5)

                Dev Dependencies (31)

                Peer Dependencies (2)

                Badge

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

                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-json-tree.

                • Markdown
                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-json-tree)
                • HTML
                  <a href="https://www.jsdocs.io/package/react-json-tree"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>