Function useBookingDraft
-
useBookingDraft(
key: string,
): {
clear: () => void;
draft: BookingDraft;
ready: boolean;
setDraft: Dispatch<SetStateAction<BookingDraft>>;
}Parameters
- key: string
Returns {
clear: () => void;
draft: BookingDraft;
ready: boolean;
setDraft: Dispatch<SetStateAction<BookingDraft>>;
}-
clear: () => void
Remove the stored draft and reset in-memory state.
-
draft: BookingDraft
Current in-memory booking draft.
-
ready: boolean
Whether the draft has been restored for this key.
-
setDraft: Dispatch<SetStateAction<BookingDraft>>
Update the in-memory and persisted draft.
Key must include installation and event to avoid cross-installation drafts.