qora_hooks 1.3.1
qora_hooks: ^1.3.1 copied to clipboard
flutter_hooks integration for qora. useQuery, useMutation, useQueryClient and useInfiniteQuery.
Changelog #
Unreleased #
1.3.1 - 2026-11-07 #
Fixed #
useMutationnow uses the offline mutation queue: withMutationOptions(offlineQueue: true), a call made while offline is queued and sent on reconnect, as withQoraMutationBuilder. It was previously sent immediately and failed.useMutationnow reports its mutations to the client, so they appear in the DevTools overlay and inQoraClient.mutationEvents.
1.3.0 - 2026-11-07 #
Added #
useFetchStatus(key): exposes theFetchStatusaxis (fetching / paused / idle) of a query to hooks, so a hook-based UI can show a background-refresh indicator or an offline badge independently of the data state.qora_hooksnow re-exportsFetchStatus,QoraException,QoraKey,QueryTagand theMutationStatefamily, so hook users no longer need a secondqora_flutterimport for common types.useQueryseedsQoraOptions.initialData/placeholderDatabefore the first build (#19).useQuery(select: ...): rebuild filter for derived data. The hook triggers a rebuild only when the state kind or the selected value changes and always returns the latest state (#22).
Fixed #
useQuery: refetches after its query is invalidated instead of staying inLoading(previousData)(fixed inqoracore).useQuery: background refetches use the latestfetcherclosure instead of the one captured on first subscription.useQuery: on key change, the first build reads the new key's cache instead of returning the previous key's state.
1.2.0 - 2026-06-15 #
1.1.0 - 2026-06-04 #
1.0.0 - 2026-06-01 #
Changed #
- Bump version to 1.0.0 to align with
qoracore package for the v1.0.0 release.
0.8.0 - 2026-03-01 #
Changed #
- Updated dependency to
qora_flutter: ^0.8.0for suite alignment with core 0.8.0 persistence release
0.7.0 - 2026-03-02 #
Added #
useIsFetching(): returnstruewhile at least one query managed by the nearestQoraClienthas a network request in flight. Initialises synchronously fromQoraClient.isFetchingCountand subscribes to the newQoraClient.fetchingCountStreamfor reactive updates.useIsMutating(): returnstruewhile at least one mutation managed by the nearestQoraClientis inMutationPendingstate. Initialises fromQoraClient.activeMutationsand subscribes toQoraClient.mutationEvents.
0.5.0 - 2026-03-01 #
Changed #
- Updated dependency to
qora_flutter: ^0.5.0for suite alignment with core 0.5.0 persistence release
0.1.0 - 2026-02-28 #
Added #
useQueryClient(): reads the nearestQoraClientfrom the widget tree viaQoraScope.of(context).useQuery<T>(): subscribes to aQoraClientquery and returns the currentQoraState<T>; auto-fetches on mount, re-subscribes on key change, and initialises from the cache for zero-loading-flash renders.useMutation<TData, TVariables>(): wrapsMutationControllerand returns aMutationHandlewith.mutate(),.mutateAsync(),.reset(), and typed state helpers (isIdle,isPending,isSuccess,isError,data,error).useInfiniteQuery<TData, TPageParam>(): pagination hook that accumulates pages; exposesfetchNextPage(),hasNextPage,isFetchingNextPage, andisLoading.MutationHandle<TData, TVariables>: value object grouping mutation state and action callbacks.InfiniteQueryHandle<TData, TPageParam>: value object grouping infinite query state and thefetchNextPagecallback.- Added
qora_flutterpath dependency to supportQoraScope.ofinuseQueryClient. - Widget tests covering all four hooks.