examples-es
examples-es copied to clipboard
Upgrade nextjs example to NextJS 14
This updates the example in nextjs
to use Next.js v14. A few minor changes to accommodate v14:
- Accessing dynamic data sources such as cookies is not permitted inside a cache scope, so the
getMessages
function we use for a fake DB had to be refactored to accept a cookie instead of doing the lookup inside: See https://nextjs.org/docs/app/api-reference/functions/unstable_cache -
serverActions
are no longer experimental and are the default so that was removed from the nextjs config file.