From 2c26d95701f33a0a8ceef7344eab018a6d613a0b Mon Sep 17 00:00:00 2001 From: Drikus Roor Date: Wed, 13 Dec 2023 17:00:13 +0100 Subject: [PATCH] config: Use React 18 in strict mode to make it easier to find issues during development --- frontend/src/index.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/frontend/src/index.js b/frontend/src/index.js index f4200f35c..46f3e5e05 100644 --- a/frontend/src/index.js +++ b/frontend/src/index.js @@ -1,5 +1,5 @@ import "./index.css"; -import React from "react"; +import React, { StrictMode } from "react"; import { createRoot } from 'react-dom/client'; import App from "./components/App/App"; import { initSentry } from "./config/sentry"; @@ -16,7 +16,15 @@ initWebAudioListener(); // Create app const container = document.getElementById("root"); const root = createRoot(container); -root.render(); +root.render( + process.env.NODE_ENV === "development" ? ( + + + + ) : ( + + ) +); // import * as serviceWorker from "./serviceWorker"; // If you want your app to work offline and load faster, you can change