
Description
React Diff Viewer Continued is a text diff viewer component for React. It shows the differences between an old and a new value in a clean layout inspired by GitHub's diff viewer, with split view, inline view, word-level diffs and line highlighting. The project is a continuation of the original component by Pranesh Ravi, with a few changes and updated dependencies so that it works with modern stacks. It is built on the diff library, and you pass the old and new values as strings or, when comparing structured data, as objects. The splitView prop switches between split and unified views, and disableWordDiff turns word-level highlighting off. The compareMethod prop chooses how the text is compared. For JSON and YAML files the README recommends the dedicated structural methods, which are much faster than generic text diffing on large files. Other props let you render an extra gutter next to the line numbers, hide the line numbers, always show chosen lines, highlight selected lines, and render code with your own syntax highlighter through a render prop. There is also a click handler for line numbers. Large diffs can be virtualized with infinite loading. The component is free and open source.…
Highlights
- Split and unified diff views
- Word-level diff and line highlighting
- Structural diffs for JSON and YAML
- Custom gutters and syntax highlighting hooks
- Virtualization for large diffs
Ratings & Reviews
No ratings yet
Be the first to rate react-diff-viewer-continued.
People also visit
react-diff-viewer-continued FAQ
What is it?
A React component that shows a text diff between two values in a GitHub-style layout, with split and inline views.
How does it differ from the original?
It is a continuation of Pranesh Ravi's diff viewer, with a few modifications and updated dependencies for modern stacks.
Can it compare JSON or YAML?
Yes. Use the JSON or YAML compare methods for structured files, which are faster than generic text diffing on large inputs.
Can I add my own syntax highlighting?
Yes. The renderContent prop lets you render code with your own highlighter, and renderGutter adds extra information beside the line numbers.
How do I handle very large diffs?
The README describes virtualization with infinite loading for large diffs.
Is it free?
Yes. The component is open source.
What are the best react-diff-viewer-continued alternatives?
Popular alternatives to react-diff-viewer-continued include react-code-compare, react-diff-viewer-continued-react19 and react-json-view-compare. See all react-diff-viewer-continued alternatives











