Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
5 replies
Max

zustand + next trpc/client. With slightly more complex feature. Vanilla client?

The problem i'm having is that trpc are hooks and not async functions that i can call in my zustand slice. And handle the logic in one place to keep thing less convoluted.

My feature is tracking crud operations on lists and items in a list. Tracking which item and list is selected. And voiding the top level get call for this data to make sure the data is up to date. As other users can have access to shared lists.

I see useContext, that changes it into a async function with the added fetch method.

Should I use the vanilla client for this?
Was this page helpful?