Client context in middleware type is `undefined`
I want to send part of the client context to the server as part of a middleware I'm making. How do I change the type of the context that is passed to the client() function? Typescript is complaining it is undefined:
Example from the docs:
How do I make it know that context has
workspaceId
?3 Replies
adverse-sapphire•4mo ago
cc @Chris Horobin
like-gold•4mo ago
Where is
workspaceId
being populated?stuck-chocolateOP•4mo ago
In my case, I am populating the equivalent of
workspaceId
in the loader of a route.
Here's an anonymized example of what my route looks like:
I'm trying to send mainItem.id
from the client to the server in the middleware