Skip to content

0.7.0

Compare
Choose a tag to compare
@drarmstr drarmstr released this 01 Apr 07:11

New Features

  • The default value is now optional for atom() and atomFamily(). If not provided the atom will initialize to a pending state. (#1639)
  • Add getStoreID() method to Snapshot (#1612)
  • Publish RecoilLoadable.loading() factory for making an async Loadable which never resolves. (#1641)

Breaking Changes

  • Selector's get() and Atom's default can now accept a Loadable to put the node in that state. If you wish to store a Loadable, Promise, or RecoilValue directly you can wrap it with selector.value() or atom.value(). (#1640)
  • useRecoilCallback() now provides a snapshot for the latest state when the callback is called instead of the latest rendered state, which had issues (#1610, #1604)

Improvements / Optimizations

  • Automatically retain snapshots for the duration of async callbacks. (#1632)
  • Optimization for more selector dependencies. 2x improvement with 100 dependencies, 4x with 1,000, and now able to support 10,000+. (#1651, #1515, #914)
  • Better error reporting when selectors provide inconsistent results (#1696)

Fixes

  • Avoid spurious console errors from effects when calling setSelf() from onSet() handlers. (#1589, #1582)
  • Freezing user values in dev mode now works in JS environments without the Window interface. (#1571)