You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And I noticed the context type is required, even though the comment above the property says it should be undefined if the future.unstable_middlewareis not enabled:
/** * When `future.unstable_middleware` is not enabled, this is undefined. * * When `future.unstable_middleware` is enabled, this is an instance of * `unstable_RouterContextProvider` and can be used to access context values * from your route middlewares. You may pass in initial context values in your * `<HydratedRouter unstable_getContext>` prop */
context: unstable_RouterContextProvider;
In the ServerDataFunctionArgs, it's conditional on MiddlewareEnabled:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey @ mainly maintainers,
I was trying to unit test my route clientLoaders, e.g.
And I noticed the context type is required, even though the comment above the property says it should be undefined if the
future.unstable_middleware
is not enabled:In the ServerDataFunctionArgs, it's conditional on MiddlewareEnabled:
I know @brophdawg11 you just landed a PR for the createRoutesStub types, is this related to the ongoing issues faced?
react-router/packages/react-router/lib/types/route-module-annotations.ts
Line 70 in c06ec85
Beta Was this translation helpful? Give feedback.
All reactions