You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the feature you would like to implement?
Hooks in auth-kit are managing query/mutations states themselves, yet it would be much more reliant to have them cached and managed by @tanstack/react-query.
Why is this feature important?
Library-independent state management is tough and increases the overall codebase complexity, along with caveat cases that are already managed by @tanstack/react-query.
Here's an example:
I have two components, one is a button that creates a channel, and the other one is a UI element that states wether a channel is created or not.
In order to implement one right now, I would have to implement a HOC that would use useCreateChannel and I'd need to propagate the state and mutation callback via props to my two components.
If this library leveraged @tanstack/react-query, I'd be able to call the hook separately in each component, and as long as the inputs are the same, I'd have the same state from react query cache.
How should this feature be built? (optional)
Just need to refactor anything that defines isSuccess, isError, state finality callback handlers, queries or mutations and such to use @tanstack/react-uqery.
Additional context
Developers using auth-kit would have to define their own QueryClient, which they already do with [email protected], so likelihood they've done it already is pretty high.
The text was updated successfully, but these errors were encountered:
What is the feature you would like to implement?
Hooks in
auth-kit
are managing query/mutations states themselves, yet it would be much more reliant to have them cached and managed by@tanstack/react-query
.Why is this feature important?
Library-independent state management is tough and increases the overall codebase complexity, along with caveat cases that are already managed by
@tanstack/react-query
.Here's an example:
I have two components, one is a button that creates a channel, and the other one is a UI element that states wether a channel is created or not.
In order to implement one right now, I would have to implement a HOC that would use
useCreateChannel
and I'd need to propagate the state and mutation callback via props to my two components.If this library leveraged
@tanstack/react-query
, I'd be able to call the hook separately in each component, and as long as the inputs are the same, I'd have the same state from react query cache.How should this feature be built? (optional)
Just need to refactor anything that defines
isSuccess
,isError
, state finality callback handlers, queries or mutations and such to use@tanstack/react-uqery
.Additional context
Developers using
auth-kit
would have to define their ownQueryClient
, which they already do with[email protected]
, so likelihood they've done it already is pretty high.The text was updated successfully, but these errors were encountered: