Skip to content

Commit 9e5b86e

Browse files
committed
feat: add recoil
1 parent bf1632b commit 9e5b86e

File tree

3 files changed

+38
-7
lines changed

3 files changed

+38
-7
lines changed

frontend/app/root.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99

1010
import type { Route } from "./+types/root";
1111
import "./root.css";
12+
import { RecoilRoot } from "recoil";
1213

1314
export const links: Route.LinksFunction = () => [
1415
{ rel: "preconnect", href: "https://fonts.googleapis.com" },
@@ -23,21 +24,23 @@ export const links: Route.LinksFunction = () => [
2324
},
2425
];
2526

26-
export function Layout({ children }: { children: React.ReactNode }) {
27+
export function Layout({ children }: { children: React.ReactNode }) {
2728
return (
29+
<RecoilRoot>
2830
<html lang="en">
2931
<head>
3032
<meta charSet="utf-8" />
3133
<meta name="viewport" content="width=device-width, initial-scale=1" />
3234
<Meta />
3335
<Links />
3436
</head>
35-
<body>
36-
{children}
37-
<ScrollRestoration />
38-
<Scripts />
37+
<body>
38+
{children}
39+
<ScrollRestoration />
40+
<Scripts />
3941
</body>
4042
</html>
43+
</RecoilRoot>
4144
);
4245
}
4346

frontend/package-lock.json

Lines changed: 28 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"isbot": "^5.1.31",
1919
"react": "^19.1.1",
2020
"react-dom": "^19.1.1",
21-
"react-router": "^7.9.2"
21+
"react-router": "^7.9.2",
22+
"recoil": "^0.7.7"
2223
},
2324
"devDependencies": {
2425
"@react-router/dev": "^7.9.2",

0 commit comments

Comments
 (0)