Skip to content

Commit

Permalink
config: Use React 18 in strict mode to make it easier to find issues …
Browse files Browse the repository at this point in the history
…during development
  • Loading branch information
drikusroor committed Dec 16, 2023
1 parent 231d3d4 commit 2c26d95
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions frontend/src/index.js
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -16,7 +16,15 @@ initWebAudioListener();
// Create app
const container = document.getElementById("root");
const root = createRoot(container);
root.render(<App />);
root.render(
process.env.NODE_ENV === "development" ? (
<StrictMode>
<App />
</StrictMode>
) : (
<App />
)
);

// import * as serviceWorker from "./serviceWorker";
// If you want your app to work offline and load faster, you can change
Expand Down

0 comments on commit 2c26d95

Please sign in to comment.