Skip to content

Commit 05144a3

Browse files
committed
fix(remix-server-runtime): don't use React types
1 parent 70a385e commit 05144a3

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

packages/remix-server-runtime/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"devDependencies": {
2626
"@remix-run/web-file": "^3.0.2",
2727
"@types/cookie": "^0.4.0",
28-
"@types/react": "^18.0.15",
2928
"@types/set-cookie-parser": "^2.4.1"
3029
},
3130
"engines": {

packages/remix-server-runtime/routeModules.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import type {
44
Params,
55
RouterState,
66
} from "@remix-run/router";
7-
import type { ComponentType } from "react";
87

98
import type { AppLoadContext, AppData } from "./data";
109
import type { LinkDescriptor } from "./links";
@@ -48,23 +47,25 @@ export interface ActionFunction {
4847
/**
4948
* A React component that is rendered when the server throws a Response.
5049
*
51-
* @deprecated Please enable the v2_errorBoundary flag
50+
* @deprecated Please use `@remix-run/react`'s `CatchBoundaryComponent` type instead
5251
*/
53-
export type CatchBoundaryComponent = ComponentType;
52+
export type CatchBoundaryComponent = any;
5453

5554
/**
5655
* A React component that is rendered when there is an error on a route.
5756
*
58-
* @deprecated Please enable the v2_errorBoundary flag
57+
* @deprecated Please use `@remix-run/react`'s `ErrorBoundaryComponent` type instead
5958
*/
60-
export type ErrorBoundaryComponent = ComponentType<{ error: Error }>;
59+
export type ErrorBoundaryComponent = any;
6160

6261
/**
6362
* V2 version of the ErrorBoundary that eliminates the distinction between
6463
* Error and Catch Boundaries and behaves like RR 6.4 errorElement and captures
6564
* errors with useRouteError()
65+
*
66+
* @deprecated Please use `@remix-run/react`'s `V2_ErrorBoundaryComponent` type instead
6667
*/
67-
export type V2_ErrorBoundaryComponent = ComponentType;
68+
export type V2_ErrorBoundaryComponent = any;
6869

6970
export type HeadersArgs = {
7071
loaderHeaders: Headers;
@@ -262,8 +263,10 @@ type LdJsonValue = LdJsonPrimitive | LdJsonObject | LdJsonArray;
262263

263264
/**
264265
* A React component that is rendered for a route.
266+
*
267+
* @deprecated Please use `@remix-run/react`'s `RouteComponent` type instead
265268
*/
266-
export type RouteComponent = ComponentType<{}>;
269+
export type RouteComponent = any;
267270

268271
/**
269272
* An arbitrary object that is associated with a route.

0 commit comments

Comments
 (0)