mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-19 16:21:13 +01:00
Better model updates
This commit is contained in:
@@ -33,7 +33,7 @@ export function useKeyValue<T extends Object | null>({
|
||||
const mutate = useMutation<void, unknown, T>({
|
||||
mutationFn: (value) => setKeyValue<T>({ namespace, key, value }),
|
||||
// k/v should be as fast as possible, so optimistically update the cache
|
||||
onMutate: (value) => queryClient.setQueryData(keyValueQueryKey({ namespace, key }), value),
|
||||
onMutate: (value) => queryClient.setQueryData<T>(keyValueQueryKey({ namespace, key }), value),
|
||||
});
|
||||
|
||||
const set = useCallback(
|
||||
|
||||
Reference in New Issue
Block a user