xoid icon indicating copy to clipboard operation
xoid copied to clipboard

1.0.0-beta.14 | Add the new middleware system

Open onurkerimov opened this issue 1 year ago • 0 comments

Added

  • .get method to atoms
  • The new middleware API that's accesed via atom.call or atom.bind.

Deprecated

  • State getter's additional overload for consuming external sources is deprecated, instead use the new middleware API.

Before:

const $derived = atom((get) => get(store.getState, store.subscribe))

After:

const $derived = atom.call({
  get: store.getState,
  subscribe: store.subscribe
})

onurkerimov avatar May 07 '24 10:05 onurkerimov