Next.js to ShadowJS
Move a Next.js app to Dusk with file routes and loaders, server functions for actions, API routes for route handlers, middleware, head tags, environment variables, Clerk and Convex, and read what has no equivalent yet.
Dusk covers the server half of a Next.js app: file routes, data loading, mutations that call the server, route handlers, middleware, server rendering with streaming, and a Node server. The component model underneath is ShadowJS, not React, so a port has two parts that you can do in either order:
- The UI follows React to ShadowJS: components run once, state is signals, there are no hooks rules. This page does not repeat it.
- The server follows this page: every Next.js file convention and API below has a Dusk counterpart or is listed under what has no equivalent.
If you have not chosen what to move first, read the migration overview. The Dusk guides are Dusk, routing and data, server functions, security, deploy and testing.