diff --git a/package-lock.json b/package-lock.json index f344055c..c7ae48a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,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", @@ -60,6 +61,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" diff --git a/package.json b/package.json index 01d10227..42ad3049 100644 --- a/package.json +++ b/package.json @@ -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" @@ -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", diff --git a/src/react/handle-conventions.ts b/src/react/handle-conventions.ts index 8087ad0b..1326538a 100644 --- a/src/react/handle-conventions.ts +++ b/src/react/handle-conventions.ts @@ -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 = { id: string; data: Data;