1 | # Change Log
|
2 |
|
3 | ## UPCOMING
|
4 | ***Add new changes here as they land***
|
5 |
|
6 | ### Pending
|
7 | - Memory management
|
8 | - useTransition() compatibility
|
9 | - Re-renders from Recoil updates now occur 1) earlier, 2) in sync with React updates in the same batch, and 3) before transaction observers instead of after.
|
10 |
|
11 | ## 0.5.1 (2021-11-05)
|
12 |
|
13 | - Fix TypeScript exports
|
14 |
|
15 | ## 0.5.0 (2021-11-03)
|
16 |
|
17 | - Added `useRecoilRefresher_UNSTABLE()` hook which forces a selector to re-run it's `get()`, and is a no-op for an atom. (#972, #1294, #1302)
|
18 | - Atom effect improvements:
|
19 | - Add `getLoadable()`, `getPromise()`, and `getInfo_UNSTABLE()` to Atom Effects interface for reading other atoms. (#1205, #1210)
|
20 | - Add `isReset` parameter to `onSet()` callback to know if the atom is being reset or not. (#1358, #1345)
|
21 | - `Loadable` improvements:
|
22 | - Publish `RecoilLoadable` interface with factories and type checking for Loadables. (#1263, #1264, #1312)
|
23 | - Ability to map Loadables with other Loadables. (#1180)
|
24 | - Re-implement Loadable as classes. (#1315)
|
25 | - Improved dev-mode checks:
|
26 | - Atoms freeze default, initialized, and async values. Selectors should not freeze upstream dependencies. (#1261, #1259)
|
27 | - Perform runtime check that required options are provided when creating atoms and selectors. (#1324)
|
28 | - Allow class instances in family parameters for Flow
|
29 |
|
30 | ## 0.4.1 (2021-08-26)
|
31 |
|
32 | - Performance optimizations to suppress re-rendering components:
|
33 | - When subscribed selectors evaluate to the same value. (#749, #952)
|
34 | - On initial render when not using React Concurrent Mode (#820)
|
35 | - When selector async deps resolve, but React re-renders before chained promises have executed.
|
36 | - Fixed #1072 where in some cases selectors with async deps would not update in response to state updates
|
37 |
|
38 | ## 0.4 (2021-07-30)
|
39 |
|
40 | ### New Features
|
41 | - 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.
|
42 | - Improved `useRecoilTransaction_UNSTABLE()` hook for transactions with multiple atoms (#1085)
|
43 |
|
44 | ### Fixes and Optimizations
|
45 |
|
46 | - Fix TypeScript typing for `selectorFamily()`, `getCallback()`, `useGetRecoilValueInfo()`, and `Snapshot#getNodes()` (#1060, #1116, #1123)
|
47 | - Allow mutable values in selectors to be used with waitFor*() helpers (#1074, #1096)
|
48 | - Atom Effects fixes:
|
49 | - 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)
|
50 | - Fix support for multiple Atom effects cleanup handlers (#1125)
|
51 | - Fix selector subscriptions when atoms with effects are initialized via a `Snapshot` (#1135, #1107)
|
52 | - Optimization for async selectors when dependencies resolve to cached values (#1037)
|
53 | - Remove unnecessary warning message (#1034, #1062)
|
54 |
|
55 | ## 0.3.1 (2021-5-18)
|
56 |
|
57 | - Fix TypeScript exports
|
58 |
|
59 | ## 0.3.0 (2021-5-14)
|
60 |
|
61 | 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)
|
62 |
|
63 | ### New Features / Improvements
|
64 | - Add `override` prop to `<RecoilRoot>` (#973)
|
65 | - Add `getCallback()` to selector evaluation interface (#989)
|
66 | - Improved TypeScript and Flow typing for `Loadable`s (#966, #1022)
|
67 |
|
68 | ### Performance Optimizations
|
69 | - Improve scalability (time and memory) of Atom families by cleaning up a legacy feature.
|
70 |
|
71 | ### Bug Fixes
|
72 | - Throwing an error in an async selector should be properly caught by `<ErrorBoundary>`'s (#998, #1017)
|
73 | - Fix for Atom Effects `onSet()` should not be called when triggered from `setSelf()` initializing with a Promise or from the same `onSet()` handler. (#974, #979, #953, #986)
|
74 | - Improved support for Safari (#967, #609)
|
75 | - Objects stored in selectors are properly frozen in dev mode (#911)
|
76 |
|
77 | ## 0.2.0 (2021-3-18)
|
78 |
|
79 | ### Major improvements
|
80 |
|
81 | - More reliable async selectors
|
82 | - Improved performance using HAMT data structures (b7d1cfddec66dae).
|
83 |
|
84 | ### Other improvements
|
85 |
|
86 | - Changed semantics of waitForAny() such that it will always return loadables unless everything is loading. This better aligns behaviour of waitForAny() and waitForNone()
|
87 | - Added a waitForAllSettled helper analogous to Promise.allSettled. (4c95591)
|
88 | - Friendly error message for misuse of useRecoilCallback (#870)
|
89 | - Friendly error message if you try to use an async function as a selector setter, which is not supported. (#777)
|
90 | - Improved React Native support. (#748, #702)
|
91 | - Added useGetRecoilValueInfo_UNSTABLE() hook for dev tools. (#713, #714)
|
92 |
|
93 | ### Bug fixes
|
94 |
|
95 | - Selectors now treat any non-Promise that is thrown as an error, rather than only instances of Error. (f0e66f727)
|
96 | - A child of RecoilRoot could sometimes have its state updated after being unmounted. (#917)
|
97 | - The error message for missing RecoilRoot wasn't displayed on React experimental releases. (#712)
|
98 | - IE 11 compatibility (#894, d27c800d8)
|
99 | - Errors shouldn't be frozen (#852)
|
100 | - Atom effects could fail to initialize atoms in certain cases (#775).
|
101 | - Async selectors would fail with multiple React roots (a618a3).
|
102 |
|
103 | ## 0.1.3 (2021-3-2)
|
104 |
|
105 | - Fixed peer dependencies
|
106 |
|
107 | ## 0.1.2 (2020-10-30)
|
108 |
|
109 | - Fix TypeScript exports
|
110 |
|
111 | ## 0.1.1 (2020-10-29)
|
112 |
|
113 | - Performance Improvements
|
114 | - Experimental React Native support
|
115 | - Experimental Atom Effects
|
116 | - Experimental Snapshot construction
|
117 |
|
118 | ## 0.0.13 (2020-09-16)
|
119 |
|
120 | - Fix for bug affecting SSR
|
121 |
|
122 | ## 0.0.12 (2020-09-15)
|
123 |
|
124 | - Fix for bug affecting SSR on development builds
|
125 |
|
126 | ## 0.0.11 (2020-09-15)
|
127 |
|
128 | - Experimental React Concurrent Mode Support
|
129 | - Performance
|
130 | - Flow Types
|
131 | - ES, CommonJS, and UMD packages
|
132 | - Synchronization Across React Roots
|
133 | - Preliminary Developer Tools API
|
134 | - Test Infrastructure Fixes
|
135 |
|
136 | ## 0.0.10 (2020-06-18)
|
137 |
|
138 | ### Bug Fix
|
139 |
|
140 | - Fix exports for snapshot hooks
|
141 |
|
142 | ## 0.0.9 (2020-06-17)
|
143 |
|
144 | ### Features
|
145 |
|
146 | - TypeScript support now rolled into Recoil repository and package.
|
147 | - Recoil Snapshot API for observing and managing global Recoil state.
|
148 |
|
149 | ### Improvements
|
150 |
|
151 | - Throw error with meaningful message if user doesn't use an atom or selector with most Recoil hooks (#205) - Thanks @alexandrzavalii
|
152 | - Improve testing (#321, #318, #294, #262, #295) - Thanks @aaronabramov, @Komalov, @mondaychen, @drarmstr, and @tyler-mitchell
|
153 | - Improve open-source build (#249, #203, #33) - Thanks to @tony-go, @acutmore, and @jaredpalmer
|
154 |
|
155 | ### Bug Fixes
|
156 |
|
157 | - Some fixes for Server Side Rendering, though we do not officially support it yet. (#233, #220, #284) - Thanks @fyber-LJX, @Chrischuck, and @aulneau
|
158 | - Fix selectors recording dependency subscriptions in some cases (#296) - Thanks @drarmstr
|
159 | - Fix updaters in `useRecoilCallback()` getting current state (#260) - Thanks @drarmstr
|
160 | - Fix error messages when throwing certain errors in the open-source build. (#199) - Thanks @jonthomp
|
161 | - Reduce Flow errors for open-source builds (#308) - Thanks @Komalov
|
162 |
|
163 | ## 0.0.8 (2020-05-30)
|
164 |
|
165 | ### Bug Fixes
|
166 |
|
167 | - Build system and repository syncing fixed.
|
168 | - Fixed a bug where atoms that stored self-referential structures would cause an infinite loop. (#153)
|
169 | - Fixed bugs affecting Server-Side Rendering. (#53)
|
170 |
|
171 | ### Features
|
172 |
|
173 | - TypeScript support is now available via DefinitelyTyped.
|
174 | - `atomFamily` and `selectorFamily`: these provide a standard way to create atoms and selectors using memoized functions. Compared with doing this yourself, in the future these will help with memory management.
|
175 | - `noWait`, `waitForNone`, `waitForAny`, `waitForAll`: helpers for concurrency and other advanced logic in async selectors.
|
176 | - `constSelector` and `errorSelector`: selectors that always evaluate to a constant or always throw an error.
|
177 | - `readOnlySelector`: wraps a read-write atom or selector in a read-only interface, for when you need type covariance.
|