aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/index.js b/src/index.js
new file mode 100644
index 0000000..4c1dc74
--- /dev/null
+++ b/src/index.js
@@ -0,0 +1,22 @@
+import React from "react";
+import ReactDOM from "react-dom";
+import { SWRConfig } from "swr";
+import "./index.css";
+import App from "./App";
+import reportWebVitals from "./reportWebVitals";
+
+const fetcher = (...args) => fetch(...args).then((res) => res.json());
+
+ReactDOM.render(
+ <React.StrictMode>
+ <SWRConfig value={{ fetcher }}>
+ <App />
+ </SWRConfig>
+ </React.StrictMode>,
+ document.getElementById("root")
+);
+
+// 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();