github facebookexperimental/Recoil 0.4.0

latest releases: 0.7.7, 0.7.6, 0.7.5...
2 years ago

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(), and Snapshot#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)

Don't miss a new Recoil release

NewReleases is sending notifications on new releases.