UNPKG

@zedux/stores

Version:

The legacy composable store model of Zedux

8 lines (7 loc) 253 B
import { AtomTemplate } from './AtomTemplate.js'; export const atom = (key, value, config) => { if (true /* DEV */ && !key) { throw new TypeError('Zedux: All atoms must have a key'); } return new AtomTemplate(key, value, config); };