@fountainhead/react-json-delta-inspector
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

react-json-delta-inspector

Visualize and explore changes to JSON objects generated by json-delta, using react-inspector.

CircleCI

Installation

For NPM users:

npm install @fountainhead/react-json-delta-inspector

For Yarn users:

yarn add @fountainhead/react-json-delta-inspector

Usage

This package contains a <DeltaInspector/> component, which accepts the following props:

  • prev (any): The 'previous' state of some Object or Array
  • delta (Diff[]): The result of calling jsonDelta.diff against prev and another object.

You will notice that <DeltaInspector /> does not accept a next object or attempt to compute a diff between two objects itself; it is on you, as the user of this package, to provide the previous state and the delta yourself. Since computing a delta is potentially an expensive operation, you are far more suited to manage how and when to compute this delta yourself via jsonDelta.diff, rather than us try to optimise it for you.

/@fountainhead/react-json-delta-inspector/

    Package Sidebar

    Install

    npm i @fountainhead/react-json-delta-inspector

    Weekly Downloads

    13

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    321 kB

    Total Files

    84

    Last publish

    Collaborators

    • rjbrooksjr
    • warrenseymour