diff --git a/docs/framework/react/start/middleware.md b/docs/framework/react/start/middleware.md index a86d716f86..41d8b9e650 100644 --- a/docs/framework/react/start/middleware.md +++ b/docs/framework/react/start/middleware.md @@ -293,10 +293,12 @@ Here's an example of how this works: ```tsx import { authMiddleware } from './authMiddleware' -const fn = createServerFn().middleware([authMiddleware]).handler(async ({ context }) => { - console.log(context.user) - // ... -}) +const fn = createServerFn() + .middleware([authMiddleware]) + .handler(async ({ context }) => { + console.log(context.user) + // ... + }) ``` ## Middleware Execution Order