Skip to content

Commit

Permalink
Fix examples for react 18
Browse files Browse the repository at this point in the history
  • Loading branch information
securingsincity committed Mar 23, 2024
1 parent 277af83 commit 5cbde2b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions example/diff.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from "react";
import { render } from "react-dom";
import { createRoot } from "react-dom/client";
import { diff as DiffEditor } from "../src/index";

import "ace-builds/src-noconflict/mode-jsx";
Expand Down Expand Up @@ -106,5 +106,5 @@ class App extends Component {
);
}
}

render(<App />, document.getElementById("example"));
const root = createRoot(document.getElementById("example"));
root.render(<App />);
5 changes: 3 additions & 2 deletions example/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from "react";
import { render } from "react-dom";
import { createRoot } from "react-dom/client";
import AceEditor from "../src/ace";

import "ace-builds/src-noconflict/mode-jsx";
Expand Down Expand Up @@ -387,4 +387,5 @@ class App extends Component {
}
}

render(<App />, document.getElementById("example"));
const root = createRoot(document.getElementById("example"));
root.render(<App />);
6 changes: 3 additions & 3 deletions example/split.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from "react";
import { render } from "react-dom";
import { createRoot } from "react-dom/client";
import SplitAceEditor from "../src/split";
import "ace-builds/src-noconflict/mode-jsx";
import "ace-builds/src-min-noconflict/ext-searchbox";
Expand Down Expand Up @@ -363,5 +363,5 @@ class App extends Component {
);
}
}

render(<App />, document.getElementById("example"));
const root = createRoot(document.getElementById("example"));
root.render(<App />);

0 comments on commit 5cbde2b

Please sign in to comment.