Do you need jotai-tanstack-query?
jotai-tanstack-query addresses a very specific and common use case in web dev.
I maintain jotai-tanstack-query.
I used @jotaijs/jotai-tanstack-query at work before I reached out to rewrite the API to be closer to @tanstack/query. I have been maintaining it since.
jotai-tanstack-query addresses a very specific and common use case in web dev. This is how I think about it when making a decision if a project needs it.
Jotai helps you create a tree of atoms with dependencies. jotai-tanstack-query lets you create tanstack-query atoms that can be injected into this dependency tree. This creates a structure where server state is dependent on client state and downstream client state can be a derivation of some server state.
One of the most common use cases that fits this bill is server side paginated data. This is how the high level architecture looks like for that case.
Here you can see that React Components tap only into the state that they need and don't have to manage any state within them.
This is how it would look like if we use jotai and @tanstack/react-query instead of jotai-tanstack-query.
This is how it changes when we use jotai-tanstack-query.
Jotai moves client state logic outside of React, letting React Components tap into just the state that they need. jotai-tanstack-query lets you use tanstack/query outside of React, as jotai's atoms that update as the query/mutation updates.