Skip to content

Commit 94f16b2

Browse files
authored
fix: don't cache /edit route in Next recipe
Next.js cache was interfering with the dynamic `/puck` route in the next recipe. Note, the regular route is behaving as expected. This fix forces the /edit route to use dynamic rendering. ## Steps to reproduce 1. Clone the repo 2. Run yarn to install dependencies 3. Run yarn build to generate a build 4. Run yarn start to run the production build 5. Navigate to page editor 6. Reload the page 7. Make changes and hit the publish button 8. Reload the page ## What happened The old data was shown ## Wha I expected to happen The new data to be shown
1 parent cfecf54 commit 94f16b2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

recipes/next/app/puck/[...puckPath]/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ export default async function Page({
3838

3939
return <Client path={path} data={data || {}} />;
4040
}
41+
42+
export const dynamic = "force-dynamic";

recipes/next/app/puck/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { default, generateMetadata } from "./[...puckPath]/page";
1+
export { default, generateMetadata, dynamic } from "./[...puckPath]/page";

0 commit comments

Comments
 (0)