Api-Reference
useQueryClient
The useQueryClient hook returns the current QueryClient instance.
dartimport 'package:tanstack_query/tanstack_query.dart';// Returns the `QueryClient` from the nearest provider or the optional one passedfinal queryClient = useQueryClient();
dartimport 'package:tanstack_query/tanstack_query.dart';// Returns the `QueryClient` from the nearest provider or the optional one passedfinal queryClient = useQueryClient();
Options
queryClient?: QueryClient- Use this to use a custom QueryClient. Otherwise, the one from the nearest context will be used.