1.2.0 • Published 7 years ago
@fountainhead/react-json-delta-inspector v1.2.0
react-json-delta-inspector
Visualize and explore changes to JSON objects generated by json-delta, using
react-inspector.
Installation
For NPM users:
npm install @fountainhead/react-json-delta-inspectorFor Yarn users:
yarn add @fountainhead/react-json-delta-inspectorUsage
This package contains a <DeltaInspector/> component, which accepts the
following props:
prev(any): The 'previous' state of some Object or Arraydelta(Diff[]): The result of callingjsonDelta.diffagainstprevand 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.