react-diff2
v0.1.3
Published
Highlights differences between to pieces of data.
Downloads
62
Maintainers
Readme
react-diff2
Highlights the differences between two piece of data. Uses the diff module. Is a fork of react-diff project.
Installation
npm i react-diff2
Demo
http://cezary.github.io/react-diff/
Example
import React from 'react';
import Diff from 'react-diff2';
const Component = props => {
...
return (
<Diff
inputA="gogol"
inputB="google"
type="chars"
/>
);
}
or with json
:
import React from 'react';
import Diff from 'react-diff2';
const Component = props => {
...
return (
<Diff
inputA={props.oldObject}
inputB={props.newObject}
type="json"
/>
);
}
Original project
License
MIT