CupThread React Native & Expo SDK - v0.1.0
    Preparing search index...

    Interface UseAsyncDataOptions<T>

    Configuration options for useAsyncData.

    interface UseAsyncDataOptions<T = any> {
        enabled?: boolean;
        mergeStale?: (local: T | null, incoming: T) => T;
    }

    Type Parameters

    • T = any
    Index
    enabled?: boolean

    Whether the initial load should run. When false, no request is made until the value flips to true or reload/refresh is called.

    true
    
    mergeStale?: (local: T | null, incoming: T) => T

    Optional reconciliation strategy invoked when a background fetch resolves after local mutations have been applied via setData.

    When provided, receives (localData, incomingData) and returns the merged result. When omitted and local mutations occurred while the fetch was in flight, the stale incoming data write is skipped to preserve the local mutations.