How do I make Jotai work with trpc on the t3 stack?
I am having trouble finding ways to work with Jotai and trpc on nextjs.
2 Replies
could you be more specific?
you dont need to use the tRPC jotai intergration to use jotai, for global state management just create atoms and use them
if you do want to do the more complex trpc jotai stuff check the docs: https://jotai.org/docs/integrations/trpc
Jotai
tRPC — Jotai, primitive and flexible state management for React
This doc describes tRPC integration.
@whatplan I would like to use it to set and store the active organisation state globally in my app. That means I have to use trpc to make the call. But how do I make it work with both TRPC and Next when there's both a
createTRPCNext
and createTRPCJotai
in the trpc/next
and jotai-trpc
libs