Skip to content

Commit 43d3190

Browse files
committed
react 18
1 parent 9052bf5 commit 43d3190

File tree

3 files changed

+37
-29
lines changed

3 files changed

+37
-29
lines changed

package-lock.json

Lines changed: 21 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"homepage": "https://windmill-sdk-example.com",
66
"dependencies": {
77
"@windmill-labs/windmill-react-sdk": "^1.501.26",
8-
"react": "^19.0.0",
9-
"react-dom": "^19.0.0",
8+
"react": "^18.0.0",
9+
"react-dom": "^18.0.0",
1010
"react-scripts": "5.0.1",
1111
"windmill-client": "1.339.1"
1212
},

src/index.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import "@windmill-labs/windmill-react-sdk/styles";
22
import "./style.css";
33
import React from "react";
4-
//react 18
5-
// import ReactDOM from "react-dom/client";
4+
// react 18
5+
import ReactDOM from "react-dom/client";
66
// import ReactDOM from "react-dom";
7-
import { createRoot } from 'react-dom/client';
7+
// react 19
8+
// import { createRoot } from 'react-dom/client';
89
import { OpenAPI as ClientOpenAPI } from "windmill-client";
910
import { OpenAPI as ComponentsOpenAPI } from "@windmill-labs/windmill-react-sdk";
1011
import App from "./App";
@@ -22,21 +23,21 @@ async function initializeClients() {
2223
await initializeClients();
2324

2425
// react 19
25-
const root = createRoot(document.getElementById("root"));
26-
root.render(
27-
<React.StrictMode>
28-
<App />
29-
</React.StrictMode>
30-
);
31-
32-
// react 18
33-
// let react = ReactDOM.createRoot(document.getElementById("root"));
34-
// react.render(
26+
// const root = createRoot(document.getElementById("root"));
27+
// root.render(
3528
// <React.StrictMode>
3629
// <App />
3730
// </React.StrictMode>
3831
// );
3932

33+
// react 18
34+
let react = ReactDOM.createRoot(document.getElementById("root"));
35+
react.render(
36+
<React.StrictMode>
37+
<App />
38+
</React.StrictMode>
39+
);
40+
4041
// react 17
4142
// ReactDOM.render(
4243
// <React.StrictMode>

0 commit comments

Comments
 (0)