myesn

myEsn2E9

hi
github

Next.js: 5 Ways to Exit Static Rendering

Background#

Applicable to projects where the response results of route.ts are statically handled after build, resulting in: the interface always responding with the same data.

Method#

The method I used is to add the following code in route.ts:

export const dynamic = 'force-dynamic'

References:

Refactoring#

Perhaps, these methods should not be used to opt out of static handling, but rather to use Server Actions.

You can also refer to: https://juejin.cn/post/7361204571828731956#heading-4

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.