We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce3f5fb commit 5fbe191Copy full SHA for 5fbe191
gatsby-browser.js
@@ -2,6 +2,7 @@ import "./src/styles/prism-dracula.css";
2
import MainContainer from "./src/layouts/MainLayout/index";
3
import Provides from "./src/layouts/Provides/index";
4
import React from "react";
5
+import ReactDOM from "react-dom/client";
6
7
export const wrapRootElement = ({ element }) => {
8
return <Provides>{element}</Provides>;
@@ -22,3 +23,10 @@ export const onServiceWorkerUpdateReady = () => {
22
23
window.location.reload();
24
}
25
};
26
+
27
+export const replaceHydrateFunction = () => {
28
+ return (element, container) => {
29
+ const root = ReactDOM.createRoot(container);
30
+ root.render(element);
31
+ };
32
+};
0 commit comments