snöw
snöw
Explore posts from servers
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
anything specific I could check out?
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
but the as step done by trpc
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
that was the initial idea, but a custom useIsMutating with the mutation state typed in the predicate would be a better solution
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
but yep, this can be a feature request
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
I used useIsMutating straight from react-query, so nothing missed 😄
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
I guess this could be wrapped to a custom TRPC wrapper of useIsMutating where the type is narrowed based on the mutationKey
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
works, but no typesaftey 😦
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
useIsMutating with the predicate where I can access the variables
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
useContext only gives you the queries, so no luck there
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
which I need a key for, hence the need for useQueryKey
27 replies
TtRPC
Created by snöw on 6/8/2023 in #❓-help
Why cannot I specify a mutation input with useQueryKey?
The use-case is that I want global loading states for mutation with https://tanstack.com/query/v4/docs/react/reference/useIsMutating
27 replies