DiffViewer
tip
Not FreeSewing code
This component family only contains re-exports of code by other maintainers.
Since they are a dependency, we provide them as part of the @freesewing/react
package for convenience.
Please refer to the documentation for react-diff-viewer-continued and jsdiff.
Components
The DiffViewer component family provides the following components:
- DiffViewer: A re-export of react-diff-viewer-continued
Functions
The DiffViewer family also exports the following functions:
- diffJSON: A re-export of the diffJson function of the jsdiff package
- diffCheck: A re-export of the diffWords function of the jsdiff package
diffJSON
A method to diff JSON content
You can import the diffJSON
function from the diffviewer family in the @freesewing/react
package:
Javascript
import { diffJSON } from "@freesewing/react/components/DiffViewer"
diffCheck
A method to diff string content
You can import the diffCheck
function from the diffviewer family in the @freesewing/react
package:
Javascript
import { diffCheck } from "@freesewing/react/components/DiffViewer"