UNPKG

@xoid/svelte

Version:

Framework-agnostic state management library designed for simplicity and scalability

7 lines (5 loc) 165 B
function useAtom(atom, withActions) { const store = { subscribe: atom.watch }; return withActions ? [store, atom.actions] : store; } export { useAtom };