It's noteworthy that there are various ways to get from static to dynamic rendering. We have seen two of these ways:
"force-dynamic" as a configuration is rendered on demand too.However, there are more ways to opt-in dynamic rendering for a route in Next.js, which are mainly coupled to using built-in features of the framework that require dynamic rendering by their nature:
cookies().set();cookies().delete();headers();searchParamsuseSearchParams();noStore();The last one is even preferred over "force-dynamic" as it is more granular and can be used on a per-component basis.
8 comments