You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mapLeaves would recursively map every leaf (the procedures) of the structure (the router) by applying the mapper (cache() function) on each of them.
Is your feature request related to a problem? Please describe.
Not sure if this is a bug or a missing feature, but one of the key patterns with the app router is to call fetch in multiple components and have those requests cached on a per-request level (https://nextjs.org/docs/app/building-your-application/data-fetching/patterns#fetching-data-where-its-needed).
Right now, calling the same query in multiple RSC will cause multiple requests.
Describe the solution you'd like to see
Ideally, all procedures would make use of reacts Cache function
Describe alternate solutions
Right now, i'm having to wrap the rTRPC calls in react's Cache function:
api.post.hello = cache(() => api.post.hello())
Additional information
No response
The text was updated successfully, but these errors were encountered: