Fix for React 18 complaining about hydration

This commit is contained in:
Matt Aitken
2022-12-07 13:41:34 +00:00
parent 0ceea323b0
commit 0caa38c858
+2 -2
View File
@@ -1,9 +1,9 @@
import { RemixBrowser, useLocation, useMatches } from "@remix-run/react";
import { hydrate } from "react-dom";
import { hydrateRoot } from "react-dom/client";
import * as Sentry from "@sentry/remix";
import { useEffect } from "react";
hydrate(<RemixBrowser />, document);
hydrateRoot(document, <RemixBrowser />);
if (process.env.NODE_ENV === "production") {
Sentry.init({