globalThis.bitsIdCounter ??= { current: 0 }; /** * Generates a unique ID based on a global counter. */ export function useId(prefix = "bits") { globalThis.bitsIdCounter.current++; return `${prefix}-${globalThis.bitsIdCounter.current}`; }