-
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
This is working great for server data - but in my usecase I am fetching data in the client loader that I also want to cache. Below is some rough code of what I'm trying to do - is this possible?
export async function clientLoader(args: ClientLoaderFunctionArgs) {
const cache = await cacheClientLoader(args, {
type: 'swr',
})
if (cache.whiteboards) {
console.log(cache)
return cache
}
const { serverLoader } = args
const server = (await serverLoader()) as {}
const whiteboards = await getAllLocalWhiteboards()
return {
...server,
whiteboards,
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels