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
graceful-blue•7mo ago
cc @Chris Horobin
eastern-cyan•7mo ago
Where is
workspaceId being populated?rare-sapphireOP•7mo 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