MaxControl
MaxControl
TTCTheo's Typesafe Cult
Created by MaxControl on 3/11/2024 in #questions
Do server components cache their results with React Query?
I have a project that uses RSC to break down a single client component that fetches data into many server components and the minimal required client components. I am pretty sure Server Components don't cache their results, so is there a way I can update a server component to re-fetch the data? I'd rather not do some hacky thing like upping a counter to force a refresh. Can't say I didn't think about it though lol.
3 replies
TTCTheo's Typesafe Cult
Created by MaxControl on 2/26/2024 in #questions
pulling session data on server?
Is there a good solution for getting an authenticated user's id on the server? I need to pull a resource from the database based on a user's projects, which means I need the userId of the authenticated user. Is there a good solution to pull the userId on the server? I'd really hate to make my api calls on the client if I don't have to.
4 replies