Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add StrictMode to react template #3309

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions templates/react/packages/client/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ReactDOM from "react-dom/client";
import {StrictMode} from 'react'
import { App } from "./App";
import { setup } from "./mud/setup";
import { MUDProvider } from "./MUDContext";
Expand All @@ -11,9 +12,11 @@ const root = ReactDOM.createRoot(rootElement);
// TODO: figure out if we actually want this to be async or if we should render something else in the meantime
setup().then(async (result) => {
root.render(
<MUDProvider value={result}>
<App />
</MUDProvider>,
<StrictMode>
<MUDProvider value={result}>
<App />
</MUDProvider>
</StrictMode>,
);

// https://vitejs.dev/guide/env-and-mode.html
Expand Down
Loading