# react-json-compare-viewer

> it is easy for you to use this component to show the differece of two json

Latest version **1.0.1** (published 2021-08-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install react-json-compare-viewer
pnpm add react-json-compare-viewer
yarn add react-json-compare-viewer
bun add react-json-compare-viewer
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2021-08-25 |
| First published | 2021-08-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 83.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | fribble |
| Maintainers | fribble |
| Keywords | react, json, compare, diff |

## Links

- npm: https://www.npmjs.com/package/react-json-compare-viewer
- Repository: https://github.com/fribble186/react-json-compare-viewer
- Issues: https://github.com/fribble186/react-json-compare-viewer/issues
- npm.io page: https://npm.io/package/react-json-compare-viewer

## Dependencies (5)

- [react](https://npm.io/package/react.md) ^17.0.2
- [assert](https://npm.io/package/assert.md) ^2.0.0
- [process](https://npm.io/package/process.md) ^0.11.10
- [json-diff](https://npm.io/package/json-diff.md) ^0.5.4
- [react-dom](https://npm.io/package/react-dom.md) ^17.0.2

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.1 (latest) — 2021-08-25
- 1.0.0 — 2021-08-25
- 0.0.1-beta02 — 2021-08-25
- 0.0.1-beta01 — 2021-08-25

## README

# A SIMPLE REACT COMPONENT WHICH CAN COMPARE TWO JSON VISUALLY 

it is easy for you to use this component to show the differece of two json

u can customize the styles by cover the css class

![demo](https://raw.githubusercontent.com/fribble186/react-json-compare-viewer/HEAD/demo.png)

## USAGE
1. install

`yarn add react-json-compare-viewer"`

2. quote

`import JsonFormat from 'react-json-compare-viewer'`

3. use

`<div>{ JsonFormat( {a: 1}, {a: 2} ) }</div>`

## ATTENTION
if u r use webpack5, u may encounter an error which say process is not defined. 

because webpack5 do not include polyfills for nodejs

u can try add the following code to webpack config after `yarn add process`

```js
...
plugins: [
    ...
    new webpack.ProvidePlugin({
      process: 'process/browser',
    }),
    ...
]
```

---
_Source: https://npm.io/package/react-json-compare-viewer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
