-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed
Labels
Description
Describe what's incorrect/missing in the documentation
Coming from Angular I was happy to see a familiar pattern in defining routes, but I can't seem to find this style of defining routes anywhere in the source code or documentation. I've looked everywhere for Component: but it doesn't seem to exist so I'm guessing it's a mistake?
https://reactrouter.com/how-to/middleware#2-add-middleware-to-your-routes
const routes = [
{
path: "/",
unstable_middleware: [timingMiddleware], // 👈
Component: Root,
children: [
{
path: "profile",
unstable_middleware: [authMiddleware], // 👈
loader: profileLoader,
Component: Profile,
},
{
path: "login",
Component: Login,
},
],
},
];lokinderchauhan