@monarcode/effetch-query/react-native
Every export of the React Native entry point: focus and online signals from React Native's modules.
@monarcode/effetch-query/react-native builds a client's signals from React Native's own modules, which you pass in. Import what you use:
import { } from "@monarcode/effetch-query/react-native";Its exports follow, grouped by the guide that covers them. Each one has the first paragraph of its docs, and what it needs and how it fails; your editor shows the rest, with an example, when you hover the name.
React Native
Guide: React Native.
reactNativeSignals
Makes signals for React Native: focus is the app coming back to the foreground (AppState changing to "active" from anything else), and online follows NetInfo's isConnected, where null (not known yet) counts as online. Pass them as the signals option of QueryClient.make, in place of the default Signals.browser, which never changes without a DOM. The parameters are AppStateLike and NetInfoLike.
Each client starts its own listeners when one of its queries first needs them, and stops them once no cached query does or the client is disposed, so one set of signals can serve several clients.
AppStateLike
The part of React Native's AppState that reactNativeSignals uses. AppState from react-native satisfies it, so this package never imports react-native.
NetInfoLike
The part of NetInfo (@react-native-community/netinfo) that reactNativeSignals uses. Its default export satisfies it, so this package never imports it.
ReactNativeSignalsOptions
What reactNativeSignals listens to.
Prop
Type
Related pages
- Entry points: what each entry point exports.
@monarcode/effetch-query: the core entry point's namespaces and top-level names.Query: defining queries, keys and targets, and the cache from Effect.InfiniteQuery: queries that load a list one page at a time.Mutation: defining and running mutations.Entity: records whose every cached copy a write updates.QueryClient: the client, its options and hooks, and server rendering.Signals: where a client hears about focus and reconnects.@monarcode/effetch-query/react: the provider, the hooks and the boundaries.@monarcode/effetch-query/effetch: queries and mutations from Effetch endpoints.@monarcode/effetch-query/react/tanstack-router: connecting a client to TanStack Router and Start.