@oneblink/apps-react
    Preparing search index...

    Type Alias DraftsContextValue

    The value returned from useDrafts() hook

    type DraftsContextValue = {
        clearSyncError: () => void;
        deleteDraft: (formSubmissionDraftId: string) => Promise<void>;
        drafts: LocalFormSubmissionDraft[];
        isLoading: boolean;
        isSyncing: boolean;
        lastSyncTime: Date | null;
        syncDrafts: (abortSignal: AbortSignal | undefined) => Promise<void>;
        syncError: Error | null;
    }
    Index

    Properties

    clearSyncError: () => void

    A function to clear Error object from syncing drafts

    deleteDraft: (formSubmissionDraftId: string) => Promise<void>

    A function to remove a draft

    The incomplete submissions that were saved for later

    isLoading: boolean

    true if drafts are currently loading for the first time.

    isSyncing: boolean

    true drafts are syncing with other devices

    lastSyncTime: Date | null

    The date when the sync process last completed successfully, will be null until it has completed the first time.

    syncDrafts: (abortSignal: AbortSignal | undefined) => Promise<void>

    A function to trigger syncing of the drafts

    syncError: Error | null

    An Error object if syncing drafts fails