UNPKG

@mongez/react-atom

Version:
32 lines (29 loc) 1.02 kB
"use client"; import { AtomStoreContext, AtomStoreProvider } from "./store.mjs"; import React from "react"; import { jsx } from "react/jsx-runtime"; //#region ../@mongez/react-atom/src/context.tsx /** * @deprecated Re-export of `AtomStoreContext` from "./store". The context * value type changed from a key→atom record to an `AtomStore` instance; if * you only consumed this via `useAtom(key)` the migration is transparent. */ const AtomContext = AtomStoreContext; /** * Backwards-compatible alias for `<AtomStoreProvider>`. * * Maps the legacy `register` (atoms to pre-clone) to `initialAtoms`, and * `defaultValue` (record of initial atom values) to `initialValues`. * * @deprecated Use `<AtomStoreProvider>` from "./store" directly. */ function AtomProvider({ register, defaultValue, children }) { return /* @__PURE__ */ jsx(AtomStoreProvider, { initialAtoms: register, initialValues: defaultValue, children }); } //#endregion export { AtomContext, AtomProvider }; //# sourceMappingURL=context.mjs.map