-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Closed
Labels
Description
Describe what's incorrect/missing in the documentation
On this page: https://reactrouter.com/how-to/middleware#3-export-middleware-from-your-routes
Under: "Server vs Client Middleware"
The code example uses function arguments that do not exist.
async function serverMiddleware({ request }, next) {
console.log(request.method, request.url);
let response = await next();
console.log(response.status, request.method, request.url);
return response;
}
"response" does not exist.