Skip to content

Commit c131328

Browse files
authored
feat(emotion): use React 18 (#286)
1 parent ce3a445 commit c131328

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

emotion/app/entry.client.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { CacheProvider } from "@emotion/react";
22
import { RemixBrowser } from "@remix-run/react";
33
import * as React from "react";
4-
import { hydrate } from "react-dom";
4+
import { hydrateRoot } from "react-dom/client";
55

66
import ClientStyleContext from "~/styles/client.context";
77
import createEmotionCache from "~/styles/createEmotionCache";
@@ -24,9 +24,9 @@ function ClientCacheProvider({ children }: ClientCacheProviderProps) {
2424
);
2525
}
2626

27-
hydrate(
27+
hydrateRoot(
28+
document,
2829
<ClientCacheProvider>
2930
<RemixBrowser />
3031
</ClientCacheProvider>,
31-
document,
3232
);

emotion/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
"@remix-run/node": "~1.14.2",
1616
"@remix-run/react": "~1.14.2",
1717
"@remix-run/serve": "~1.14.2",
18-
"react": "^17.0.2",
19-
"react-dom": "^17.0.2"
18+
"react": "^18.2.0",
19+
"react-dom": "^18.2.0"
2020
},
2121
"devDependencies": {
2222
"@remix-run/dev": "~1.14.2",
2323
"@remix-run/eslint-config": "~1.14.2",
24-
"@types/react": "^17.0.39",
25-
"@types/react-dom": "^17.0.13",
24+
"@types/react": "^18.2.14",
25+
"@types/react-dom": "^18.2.6",
2626
"eslint": "^8.27.0",
2727
"typescript": "^4.8.4"
2828
},

0 commit comments

Comments
 (0)