Releases: facebookexperimental/Recoil
Releases · facebookexperimental/Recoil
0.5.2
0.5.1
0.5.0
0.4.1
- Performance optimizations to suppress re-rendering components:
- Fixed #1072 where in some cases selectors with async deps would not update in response to state updates
0.4.0
New Features
- Selector cache configuration: introduced
cachePolicy_UNSTABLE
option for selectors and selector families. This option allows you to control the behavior of how the selector evicts entries from its internal cache. - Improved
useRecoilTransaction_UNSTABLE()
hook for transactions with multiple atoms (#1085)
Fixes and Optimizations
- Fix TypeScript typing for
selectorFamily()
,getCallback()
,useGetRecoilValueInfo()
, andSnapshot#getNodes()
(#1060, #1116, #1123) - Allow mutable values in selectors to be used with waitFor*() helpers (#1074, #1096)
- Atom Effects fixes:
- Fix onSet() handler to get the proper new value when an atom is reset or has an async default Promise that resolves (#1059, #1050, #738) (Slightly breaking change)
- Fix support for multiple Atom effects cleanup handlers (#1125)
- Fix selector subscriptions when atoms with effects are initialized via a
Snapshot
(#1135, #1107)
- Optimization for async selectors when dependencies resolve to cached values (#1037)
- Remove unnecessary warning message (#1034, #1062)
0.3.1
0.3
Breaking Changes
For supporting garbage collection in the future there is a slight breaking change that Snapshot
's will only be valid for the duration of the callback or render. A new retain()
API can be used to persist them longer. This is not enforced yet, but Recoil will now provide a warning in dev-mode if a Snapshot
is used past its lifetime. (#1006)
New Features / Improvements
- Add
override
prop to<RecoilRoot>
(#973) - Add
getCallback()
to selector evaluation interface (#989) - Improved TypeScript and Flow typing for
Loadable
s (#966, #1022)
Performance Optimizations
- Improve scalability (time and memory) of Atom families by cleaning up a legacy feature.
Bug Fixes
- Throwing an error in an async selector should be properly caught by
<ErrorBoundary>
's (#998, #1017) - Fix for Atom Effects
onSet()
should not be called when triggered fromsetSelf()
initializing with a Promise or from the sameonSet()
handler. (#974, #979, #953, #986) - Improved support for Safari (#967, #609)
- Objects stored in selectors are properly frozen in dev mode (#911)
0.2.0
0.2.0 (2021-3-18)
Major improvements
- More reliable async selectors
- Improved performance using HAMT data structures (b7d1cfd).
Other improvements
- Changed semantics of waitForAny() such that it will always return loadables unless everything is loading. This better aligns behaviour of waitForAny() and waitForNone()
- Added a waitForAllSettled helper analogous to Promise.allSettled. (4c95591)
- Friendly error message for misuse of useRecoilCallback (#870)
- Friendly error message if you try to use an async function as a selector setter, which is not uspported. (#777)
- Improved React Native support. (#748, #702)
- Added useGetRecoilValueInfo_UNSTABLE() hook for dev tools. (#713, #714)
Bug fixes
- Selectors now treat any non-Promise that is thrown as an error, rather than only instances of Error. (f0e66f7)
- A child of RecoilRoot could sometimes have its state updated after being unmounted. (#917)
- The error message for missing RecoilRoot wasn't displayed on React experimental releases. (#712)
- IE 11 compatibility (#894, d27c800)
- Errors shouldn't be frozen (#852)
- Atom effects could fail to initialize atoms in certain cases (#775).
- Async selectors would fail with multiple React roots (a618a3).