The useCloudStorage hook provides access to the Telegram CloudStorage object using Promise-based functions, eliminating the need to manually pass callbacks. It allows you to persist data in the user's Telegram cloud.
Returns an object containing:
getItem: GetItemFunctiongetItems: GetItemsFunctiongetKeys: GetKeysFunctionremoveItem: RemoveItemFunctionsetItem: SetItemFunction
// Note: Specific implementation details for GetItemFunction etc. are in their respective documentation
const { getItem, setItem } = useCloudStorage();