Skip to content

Commit

Permalink
Fix types for RouteData
Browse files Browse the repository at this point in the history
Since remix-run/remix#5679 and remix v1.15.0, RouteData is no
longer exported by Remix. The type is now provided by
`@remix-run/router`.
  • Loading branch information
lpsinger committed May 11, 2023
1 parent 0e1ae22 commit 20daf1d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
],
"peerDependencies": {
"@remix-run/react": "^1.10.0",
"@remix-run/router": "^1.0.0",
"@remix-run/server-runtime": "^1.10.0",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"zod": "^3.19.1"
Expand All @@ -53,6 +54,7 @@
"@jest/types": "^27.2.5",
"@remix-run/node": "^1.10.0",
"@remix-run/react": "^1.10.0",
"@remix-run/router": "^1.0.0",
"@remix-run/server-runtime": "^1.10.0",
"@testing-library/jest-dom": "^5.15.0",
"@testing-library/react": "^12.1.2",
Expand Down
4 changes: 3 additions & 1 deletion src/react/handle-conventions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { RouteData } from "@remix-run/react/dist/routeData";
import type { RouterState } from "@remix-run/router";
import type { AppData } from "@remix-run/server-runtime";
import type { Location, Params } from "react-router-dom";

type RouteData = RouterState["loaderData"];

export type HandleConventionArguments<Data extends AppData = AppData> = {
id: string;
data: Data;
Expand Down

0 comments on commit 20daf1d

Please sign in to comment.