Next.js Elevates Serverless Functions
Cole Krumbholz, founder at Formspree, on the future of full-stack development
Next.js won by turning backend work into a normal frontend workflow. Instead of spinning up a separate server app for small bits of backend logic, a developer can put an API route or route handler inside the same codebase as the UI, use it to hide API keys, reshape data, handle forms, or add auth checks, and ship both together. That makes third party APIs feel like building blocks instead of separate systems to wire up.
-
The practical job of these functions is usually glue code. A page calls a local endpoint, that endpoint talks to Stripe, a CMS, Formspree, or another service with secret credentials, then returns only the cleaned up data the browser needs. Next.js bakes these endpoints into the app through API Routes and Route Handlers.
-
This is a big shift from older Jamstack, where the frontend was static and anything dynamic often lived in a separate backend service. Next.js collapsed that gap. Several teams describe it as making full stack development feel like ordinary React work, because frontend and server code sit side by side and deploy together.
-
The trade off is that easy serverless can encourage lots of per user API calls and loading states. That works well for forms, auth, and light personalization, but highly dynamic apps can run into latency, build, and control limits, which is why the market has moved toward hybrid models that mix static pages with server rendering and edge execution.
The direction is toward more of the app living in this in between layer, neither a big always on server nor a fully static site. As edge runtimes improve, Next.js style functions are becoming the default place to handle personalization, auth, and API orchestration, while specialized services continue to own payments, search, content, and forms.