EvandrooViegas / supabase-nextjs13-todo-app

0 stars 0 forks source link

static rendering even when using 'export const dynamic = 'force dynamic'' with nextjs13 #1

Open EvandrooViegas opened 1 year ago

EvandrooViegas commented 1 year ago

I created a task app with nextjs13 with the new app directory. When I first access the home page it loads the freshest todos, but when i add a todo to the database and go back to the home page it seems that the data from the initial load is cached and the new one is not fetched. I'am using dynamic = 'force-dynamic' variable to load the latest data, but still getting the cached one, it only works if i refresh the entire page.

EvandrooViegas commented 1 year ago

using "use client" on top of the page is the only way i found to solve the bug