Highlights the differences between two piece of data. Uses the diff module. Is a fork of react-diff project.
npm i react-diff2
http://cezary.github.io/react-diff/
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"
/>
);
}
MIT