()
| 947 | } |
| 948 | |
| 949 | function Component() { |
| 950 | const mutation = useMutation(() => ({ |
| 951 | mutationFn: async (_text: string) => { |
| 952 | count++ |
| 953 | await sleep(10) |
| 954 | return count |
| 955 | }, |
| 956 | mutationKey: mutationKey, |
| 957 | gcTime: 0, |
| 958 | onSuccess, |
| 959 | onSettled, |
| 960 | })) |
| 961 | |
| 962 | return ( |
| 963 | <div> |
| 964 | <button |
| 965 | onClick={() => |
| 966 | mutation.mutate('todo', { |
| 967 | onSuccess: onSuccessMutate, |
| 968 | onSettled: onSettledMutate, |
| 969 | }) |
| 970 | } |
| 971 | > |
| 972 | mutate |
| 973 | </button> |
| 974 | <div> |
| 975 | data: {mutation.data ?? 'null'}, status: {mutation.status}, |
| 976 | isPaused: {String(mutation.isPaused)} |
| 977 | </div> |
| 978 | </div> |
| 979 | ) |
| 980 | } |
| 981 | |
| 982 | const rendered = render(() => ( |
| 983 | <QueryClientProvider client={queryClient}> |
nothing calls this directly
no test coverage detected
searching dependent graphs…