aboutsummaryrefslogtreecommitdiff
path: root/examples/react/src/index.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'examples/react/src/index.jsx')
-rw-r--r--examples/react/src/index.jsx20
1 files changed, 13 insertions, 7 deletions
diff --git a/examples/react/src/index.jsx b/examples/react/src/index.jsx
index 1d316ddf0..951fbfa8d 100644
--- a/examples/react/src/index.jsx
+++ b/examples/react/src/index.jsx
@@ -1,11 +1,17 @@
-import * as React from "react";
-import ReactDOM from "react-dom";
-import "./index.css";
-import App from "./App";
+import React from 'react';
+import ReactDOM from 'react-dom/client';
+import './index.css';
+import App from './App';
+import reportWebVitals from './reportWebVitals';
-ReactDOM.render(
+const root = ReactDOM.createRoot(document.getElementById('root'));
+root.render(
<React.StrictMode>
<App />
- </React.StrictMode>,
- document.getElementById("root")
+ </React.StrictMode>
);
+
+// If you want to start measuring performance in your app, pass a function
+// to log results (for example: reportWebVitals(console.log))
+// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
+reportWebVitals(); \ No newline at end of file