Prefetch query with parameters
I have a
What if the getPosts call here, is subject to the params in the query string of the user landing on the page? Say "category" is a filter and I want to only show those.
Throws an error because now I am calling this function in the first render server side. It gives:
So what is the pattern that should be used here?
page.tsx that calls a function.What if the getPosts call here, is subject to the params in the query string of the user landing on the page? Say "category" is a filter and I want to only show those.
Throws an error because now I am calling this function in the first render server side. It gives:
So what is the pattern that should be used here?