Skip to content

Commit

Permalink
feat: move to react-diff-viewer-continued for enhanced react 18+ supp…
Browse files Browse the repository at this point in the history
…ort (#48)

There's currently warnings when installing the library regarding react,
react-dom.

As the react-diff-viewer package seems discontinued, I suggest to use an
updated one: https://www.npmjs.com/package/react-diff-viewer-continued

This might also fix some issues

---------

Co-authored-by: Sebastien Vanvelthem <sebastien.vanvelthem@weareretail.ai>
  • Loading branch information
belgattitude and Sebastien Vanvelthem authored Oct 2, 2024
1 parent e0807d1 commit 22b63c5
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 97 deletions.
9 changes: 9 additions & 0 deletions .changeset/great-eagles-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@builder.io/react-hydration-overlay": minor
---

Support React 18

Transition from [react-diff-viewer-continued](https://github.com/praneshr/react-diff-viewer)
to a maintained fork [react-diff-viewer-continued](https://github.com/aeolun/react-diff-viewer-continued)
that supports React 18.
2 changes: 1 addition & 1 deletion packages/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@
},
"dependencies": {
"beautify": "^0.0.8",
"react-diff-viewer": "^3.1.1"
"react-diff-viewer-continued": "^4.0.3"
}
}
2 changes: 1 addition & 1 deletion packages/lib/src/Overlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import beautify from "beautify";
import { createPortal } from "react-dom";
import React, { useEffect, useState } from "react";
import ReactDiffViewer, { DiffMethod } from "react-diff-viewer";
import ReactDiffViewer, { DiffMethod } from "react-diff-viewer-continued";
import { OverlayProps } from "./types";

// Remove emotion-inserted style tags from the HTML string from the server
Expand Down
174 changes: 79 additions & 95 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 22b63c5

Please sign in to comment.