Skip to content

Commit

Permalink
updated to React 19
Browse files Browse the repository at this point in the history
  • Loading branch information
EATSTEAK committed Dec 6, 2024
1 parent bae8817 commit 67ff46a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
10 changes: 6 additions & 4 deletions docs/index.js
Original file line number Diff line number Diff line change
@@ -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(
<React.StrictMode>
<Docs />
</React.StrictMode>,
document.getElementById("rapp")
</React.StrictMode>
);
10 changes: 6 additions & 4 deletions docs/single-demo.js
Original file line number Diff line number Diff line change
@@ -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() {
Expand Down Expand Up @@ -48,10 +48,12 @@ function App() {
);
}

const container = document.getElementById("rapp");
const root = createRoot(container);

React.initializeTouchEvents && React.initializeTouchEvents(true);
ReactDOM.render(
root.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById("rapp")
</React.StrictMode>
);
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -71,17 +71,17 @@
"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",
"uglifyjs-webpack-plugin": "^2.0.1",
"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",
Expand All @@ -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}": [
Expand Down

0 comments on commit 67ff46a

Please sign in to comment.