upleveled / next-js-example-spring-2023-atvie

https://next-js-example-spring-2023-vienna-austria.fly.dev/
8 stars 5 forks source link

Force Dynamic Rendering for database queries #3

Closed Josehower closed 1 year ago

Josehower commented 1 year ago

This PR update the connectOneTimeToDatabase() function in order to call headers() in every call of the sql client. This will prevent Next.js wrongly flag some pages using database queries as static content.

A new https://github.com/vercel/next.js/discussions/50695 to not need to call headers in every sql query

This PR was recreated based on https://github.com/upleveled/next-js-example-spring-2023-vienna-austria/pull/2

merged by mistake