Next.js 12.2: Middleware, On-Demand ISR, Experimental Edge SSR and API Routes

This page summarizes the projects mentioned and recommended in the original post on /r/nextjs

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • Next.js

    The React Framework

  • u/lrobinson2011 I am super excited about these updates, but I do have a slight misgiving about the changes to middleware. We use `middlware.ts` extensively, with a fair amount of routes. Previously, we could programmatically check a route to see if it was actually page or a request to something like an image, etc, with `req.page.name`. The removal of the page from the `req` object and the reliance on `new URLPattern()` (which I can't get working as mentioned in this issue here) makes the use-case of app-wide authorization much more annoying that it previously was. I am wondering what the motivation was, and if there is a more idiomatic way of only applying middleware to page routes and ignoring `/_next/`, `/public/` etc. Thanks!

  • examples

    Enjoy our curated collection of examples and solutions. Use these patterns to build your own robust and scalable applications. (by vercel)

  • To partially answer your question, there are examples of what the benefit of things like Middleware can be: https://github.com/vercel/examples/tree/main/edge-functions

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts