Skip to content

Commit

Permalink
[election-ui-js] Use React-18-compatible ReactDOM code (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbrimicombe authored Mar 27, 2023
1 parent ba7cc89 commit a537490
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
12 changes: 6 additions & 6 deletions election-ui-javascript/package-lock.json

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

17 changes: 10 additions & 7 deletions election-ui-javascript/src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import Scoreboard from './components/Scoreboard';
import React from "react";
import * as ReactDOMClient from "react-dom/client";
import "./index.css";
import Scoreboard from "./components/Scoreboard";

ReactDOM.render(
const root = ReactDOMClient.createRoot(
document.getElementById("root")
);

root.render(
<React.StrictMode>
<Scoreboard />
</React.StrictMode>,
document.getElementById('root')
</React.StrictMode>
);

0 comments on commit a537490

Please sign in to comment.