Skip to main content

Function: useDeleteAllSaves()

useDeleteAllSaves(): () => Promise<SaveResult>

Defined in: packages/core/src/saves/hooks/useDeleteAllSlots.ts:26

React hook that provides a function to delete all game saves. This function clears all saved game data from the database, keeping the system save that Game.init() writes.

Returns​

Callback function that deletes all game saves

(): Promise<SaveResult>

Returns​

Promise<SaveResult>

Example​

const deleteAllSaves = useDeleteAllSaves();
const handleDeleteAll = async () => {
const result = await deleteAllSaves();
if (!result.success) {
console.error('Delete failed:', result.error);
}
};