()
| 862 | } |
| 863 | |
| 864 | function Component() { |
| 865 | const mutation = useMutation({ |
| 866 | mutationFn: async (_text: string) => { |
| 867 | count++ |
| 868 | await sleep(10) |
| 869 | return count |
| 870 | }, |
| 871 | mutationKey, |
| 872 | gcTime: 0, |
| 873 | onSuccess, |
| 874 | onSettled, |
| 875 | }) |
| 876 | |
| 877 | return ( |
| 878 | <div> |
| 879 | <button |
| 880 | onClick={() => |
| 881 | mutation.mutate('todo', { |
| 882 | onSuccess: onSuccessMutate, |
| 883 | onSettled: onSettledMutate, |
| 884 | }) |
| 885 | } |
| 886 | > |
| 887 | mutate |
| 888 | </button> |
| 889 | <div> |
| 890 | data: {mutation.data ?? 'null'}, status: {mutation.status}, |
| 891 | isPaused: {String(mutation.isPaused)} |
| 892 | </div> |
| 893 | </div> |
| 894 | ) |
| 895 | } |
| 896 | |
| 897 | const rendered = renderWithClient(queryClient, <Page />) |
| 898 |
nothing calls this directly
no test coverage detected
searching dependent graphs…