Type Alias: UseMnemonicKeyOptions<T>
UseMnemonicKeyOptions<
T> =object
Defined in: src/Mnemonic/types.ts:1280
Configuration options for the useMnemonicKey hook.
These options control how a value is persisted, decoded, and synchronized across the application.
Example
const { value, set } = useMnemonicKey<User>("currentUser", {
defaultValue: { name: "Guest", id: null },
onMount: (user) => console.log("Loaded user:", user),
onChange: (current, previous) => {
console.log("User changed from", previous, "to", current);
},
listenCrossTab: true,
});
Type Parameters
| Type Parameter | Description |
|---|---|
T | The TypeScript type of the stored value |