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