New
0.7.0
New Features
- The
defaultvalue is now optional foratom()andatomFamily(). If not provided the atom will initialize to a pending state. (#1639) - Add
getStoreID()method toSnapshot(#1612) - Publish
RecoilLoadable.loading()factory for making an asyncLoadablewhich never resolves. (#1641)
Breaking Changes
- Selector's
get()and Atom'sdefaultcan now accept aLoadableto put the node in that state. If you wish to store aLoadable,Promise, orRecoilValuedirectly you can wrap it withselector.value()oratom.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()fromonSet()handlers. (#1589, #1582) - Freezing user values in dev mode now works in JS environments without the
Windowinterface. (#1571)