Supabase dynamic route
Unanswered
Selkirk Rex posted this in #help-forum
Selkirk RexOP
Probably a very simple question but I'm having trouble wrapping my head around the behaviour in the new app router for dynamic data. If I have a route that displays data from a supabase instance using an
async page component, I have to delete the ./.next directory cache and rebuild to get the data to update. Is the only solution here to use export const dynamic = 'force-dynamic' on the page?3 Replies
@Selkirk Rex Probably a very simple question but I'm having trouble wrapping my head around the behaviour in the new app router for dynamic data. If I have a route that displays data from a supabase instance using an `async` page component, I have to delete the ./.next directory cache and rebuild to get the data to update. Is the only solution here to use `export const dynamic = 'force-dynamic'` on the page?
this is because nextjs asumes the data is not dynamic if u dont use any of the dynamic functions inside that route
so if u for example use cookies() in your route it will automatically switch to dynamic rendering without needing to export
Selkirk RexOP
Thanks for the reply! I understand that part, though it is not clear to me why this assumption is valid, since many use-cases have dynamic upstream data sources even if the local state remains the same. Any multi-user web app would potentially fall into this category?