aboutsummaryrefslogtreecommitdiff
path: root/examples/react/src/index.jsx
diff options
context:
space:
mode:
authorGravatar Jonathan Rubin <jonathan.a.rubin@gmail.com> 2022-07-15 06:17:38 -0400
committerGravatar GitHub <noreply@github.com> 2022-07-15 12:17:38 +0200
commitb901f55164c9f60dc9da5d13ad13f7ff9c1d2bac (patch)
tree74e056cf660106be43493321abec58265027a490 /examples/react/src/index.jsx
parent9eac93d176f673692aef88356dcf780b3dfa0d3f (diff)
downloadbun-b901f55164c9f60dc9da5d13ad13f7ff9c1d2bac.tar.gz
bun-b901f55164c9f60dc9da5d13ad13f7ff9c1d2bac.tar.zst
bun-b901f55164c9f60dc9da5d13ad13f7ff9c1d2bac.zip
chores(template/react): Update to React 18 (#627)
* Updated react example template * build:(landing) automated website build * removed bun.lockb and most of changes from react example index.html Co-authored-by: rubinj30 <rubinj30@users.noreply.github.com>
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
td>formatGravatar Dylan Conway 1-1/+2 2023-10-06Fix memory leak in fetch() (#6350)Gravatar Jarred Sumner 1-2/+0 2023-10-06[types] allow onLoad plugin callbacks to return undefined (#6346)Gravatar Silver 1-1/+1 2023-10-06docs: `file.stream()` is not a promise (#6337)Gravatar Paul Nodet 1-1/+1