Replacement for `import { getContext, setContext } from '@tanstack/react-start/server'` in RC?
These used to be a wrapper around H3: https://github.com/TanStack/router/blob/v1.131.27/packages/start-server-core/src/h3.ts#L481
GitHub
router/packages/start-server-core/src/h3.ts at v1.131.27 · TanStac...
🤖 Fully typesafe Router for React (and friends) w/ built-in caching, 1st class search-param APIs, client-side cache integration and isomorphic rendering. - TanStack/router
4 Replies
ratty-blushOP•17h ago
I was using it for request-level caching.
genetic-orange•16h ago
what do need to cache here?
where do write to it?
ratty-blushOP•16h ago
I write to it from a server-side function. Imagine a "getUserSession" function that is cached using server context. Other server functions can then call getUserSession without worrying about refetching multiple times per request. Same applies for anything else that does not change during a request but may be invoked multiple times.
genetic-orange•11h ago
we might add something similar again