Closed typeofweb closed 5 days ago
Hey @typeofweb, Thanks, I appreciate your support!
For the stability, since the majority of APIs that are exposed from the package use these storages, and I made read-only access to them, it makes it stable enough.
For the reliability, NextJs is nearly based on these storages for building requests and end responses for everything. If they want to make changes to it, it's going to be a major level release, which makes the incoming changes predictable.
These APIs are not documented for obvious reasons. I am not a Vercel insider nor in the NextJs developer team, but I highly recommend you read the NextJs source code itself to know where and how these storages are being used.
Here are some APIs that everybody uses and in underlying code, the staticGenerationAsyncStorage
and requestAsyncStorage
are being used.
import { headers, cookies } from 'next/headers';
import { redirect, permanentRedirect } from 'next/navigation';
For now, I only made for support for Next 14, and at current state this package is NOT working in Next 15.
Hi @shahradelahi ! what do you mean by it's NOT going to work in Next 15 ? you don't plan to support Next 15 ?
Hi @Neodark7,
I'll make support for both Next 14 and Next 15, but the Next 15 is not stable yet. What I said before was for those who are using the canary version of Next 15.
First of all, let me tell you I admire the effort you've put into digging through Next.js internals and putting
next-extra
together. Kudos! 🙇The libraries make use of
staticGenerationAsyncStorage
andrequestAsyncStorage
. Both are undocumented by the Next.js team and imported from paths that seem to be for internal use only.Could you tell me your take on their reliability/stability? Any insights you can give me would be useful. Thanks!