UNPKG

@zedux/atoms

Version:

A Molecular State Engine for React

12 lines (11 loc) 401 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.atom = void 0; const AtomTemplate_1 = require("../classes/templates/AtomTemplate"); const atom = (key, value, config) => { if (true /* DEV */ && !key) { throw new TypeError('Zedux: All atoms must have a key'); } return new AtomTemplate_1.AtomTemplate(key, value, config); }; exports.atom = atom;