Welcome to Recoil 0.5 with a few new APIs and improvements.
Hook for refreshing selectors
The useRecoilRefresher_UNSTABLE()
hook has been added for refreshing selectors that execute data queries. This is useful if you just want to refresh for newer data or retry due to an error. (#972, #1294, #1302)
Atom effect improvements
- Add
isReset
parameter toonSet()
callback to know if the atom was reset. (#1358, #1345) - Add
getLoadable()
,getPromise()
, andgetInfo_UNSTABLE()
for reading other atoms. (#1205, #1210)
Loadable factories
The RecoilLoadable
interface is now available for making your own Loadable
objects. (#1263, #1264, #1312)
Other fixes and improvements
- Allow class instances in family parameters for Flow (#1215)
Loadable
improvements:- Fix user-thrown promises in selectors for some cases.
- Improved dev-mode checks:
- Upgrade Prettier version (#1366)
Also lots of restructuring in preparation for the upcoming recoil-sync
library release...