diff --git a/docs/index.js b/docs/index.js
index 763285354..a903857c0 100644
--- a/docs/index.js
+++ b/docs/index.js
@@ -1,13 +1,15 @@
"use strict";
import React from "react";
-import ReactDOM from "react-dom";
+import { createRoot } from "react-dom/client";
import Docs from "./docs";
+const container = document.getElementById("rapp");
+const root = createRoot(container);
+
React.initializeTouchEvents && React.initializeTouchEvents(true);
-ReactDOM.render(
+root.render(
- ,
- document.getElementById("rapp")
+
);
diff --git a/docs/single-demo.js b/docs/single-demo.js
index 81d7213e8..07929a1aa 100644
--- a/docs/single-demo.js
+++ b/docs/single-demo.js
@@ -1,7 +1,7 @@
"use strict";
import React from "react";
-import ReactDOM from "react-dom";
+import { createRoot } from "react-dom/client";
import Slider from "../src/slider";
import MultipleItems from "../examples/MultipleItems";
function SimpleSlider() {
@@ -48,10 +48,12 @@ function App() {
);
}
+const container = document.getElementById("rapp");
+const root = createRoot(container);
+
React.initializeTouchEvents && React.initializeTouchEvents(true);
-ReactDOM.render(
+root.render(
- ,
- document.getElementById("rapp")
+
);
diff --git a/package.json b/package.json
index 508ec272a..8137c9cba 100644
--- a/package.json
+++ b/package.json
@@ -44,7 +44,7 @@
"@babel/preset-env": "^7.1.0",
"@babel/preset-react": "^7.0.0",
"@testing-library/jest-dom": "^5.16.4",
- "@testing-library/react": "^13.3.0",
+ "@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^14.3.0",
"autoprefixer": "^7.1.2",
"babel-core": "^7.0.0-bridge.0",
@@ -71,8 +71,9 @@
"postcss-loader": "^1.3.3",
"prettier": "^1.14.3",
"raf": "^3.4.0",
- "react": "^18.0.0",
- "react-dom": "^18.0.0",
+ "react": "^19.0.0",
+ "react-dom": "^19.0.0",
+ "regenerator-runtime": "^0.14.1",
"sinon": "^2.1.0",
"slick-carousel": "^1.8.1",
"style-loader": "^0.16.1",
@@ -80,8 +81,7 @@
"webpack": "^4.21.0",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.9",
- "why-did-you-update": "^0.1.1",
- "regenerator-runtime": "^0.14.1"
+ "why-did-you-update": "^0.1.1"
},
"dependencies": {
"classnames": "^2.2.5",
@@ -91,8 +91,8 @@
"resize-observer-polyfill": "^1.5.0"
},
"peerDependencies": {
- "react": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0",
- "react-dom": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0"
+ "react": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+ "react-dom": "^0.14.0 || ^15.0.1 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
},
"lint-staged": {
"*.{js,json,md}": [