Skip to content

Commit a7b89d4

Browse files
Include react-router.config.ts
1 parent 26a8ced commit a7b89d4

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint": "eslint .",
1010
"preview": "vite preview",
1111
"typecheck": "react-router typegen && tsc",
12-
"format": "prettier --write './**/*.{js,jsx,ts,tsx}'"
12+
"format": "prettier --write './**/*.{js,jsx,ts,tsx,md}'"
1313
},
1414
"dependencies": {
1515
"@react-router/node": "^7.1.1",

src/pages/about.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export async function clientLoader() {
1212

1313
return {
1414
title: "About page",
15+
data
1516
};
1617
}
1718

@@ -24,6 +25,8 @@ export default function Component({ loaderData }: { loaderData: LoaderData }) {
2425
<>
2526
<h1 className="mb-6">{loaderData.title}</h1>
2627
<Link to="/">Home</Link>
28+
<p className="mt-6">Loaded data:</p>
29+
<pre className="bg-[black] rounded-xl border border-secondary p-6 mt-3">{JSON.stringify(loaderData, null, 2)}</pre>
2730
</>
2831
);
2932
}

tsconfig.app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
"rootDirs": [".", "./.react-router/types"],
2626
"verbatimModuleSyntax": true
2727
},
28-
"include": ["src", ".react-router/types/**/*"]
28+
"include": ["src", ".react-router/types/**/*", "react-router.config.ts"]
2929
}

0 commit comments

Comments
 (0)