11# Changelog
22
3+ ### v3.1.0 (2018/7/10)
4+
5+ ** New Features**
6+
7+ - ` doFetch ` now returns a Promise that _ always_ resolves. The value that it resolves to is
8+ the same object that is passed to ` afterFetch ` . Note that ` afterFetch ` is only called when a
9+ network request has actually been performed, whereas ` doFetch ` resolves even when the cache is hit.
10+
311### v3.0.1 (2018/4/24)
412
513** Bug Fixes**
614
7- * Fixes a bug where ` isLazy ` would sometimes be computed using previous
15+ - Fixes a bug where ` isLazy ` would sometimes be computed using previous
816 props rather than the current props.
917
1018### v3.0.0 (2018/4/24)
1422
1523** Breaking Changes**
1624
17- * When a request fails, the ` data ` from a request will no longer be set to ` null ` . This
25+ - When a request fails, the ` data ` from a request will no longer be set to ` null ` . This
1826 allows you to control whether or not your UI continues to display the existing data.
1927
20- * The ` responseType ` prop is now more forgiving. If the body cannot be parsed with
28+ - The ` responseType ` prop is now more forgiving. If the body cannot be parsed with
2129 the ` responseType ` that you set, then ` data ` will be set to ` null ` .
2230
2331### v2.0.4 (2018/4/20)
2432
2533** Bug Fixes**
2634
27- * Fixes a bug where there could be a cache mismatch when re-rendering the same component
35+ - Fixes a bug where there could be a cache mismatch when re-rendering the same component
2836 that has a fetch policy configured.
2937
3038### v2.0.3 (2018/3/2)
3139
3240** Bug Fixes**
3341
34- * Fixes a bug where the ` lazy ` prop was not always respected. Anytime that a new request key was generated,
42+ - Fixes a bug where the ` lazy ` prop was not always respected. Anytime that a new request key was generated,
3543 a request would be made.
3644
3745### v2.0.2 (2018/2/21)
3846
3947** Bug Fixes**
4048
41- * Fixes a bug where an Uncaught ReferenceError could be thrown
49+ - Fixes a bug where an Uncaught ReferenceError could be thrown
4250
4351### v2.0.1 (2018/2/17)
4452
4553** Bug Fixes**
4654
47- * This fixes a problem where the default ` fetchPolicy ` would be ` "cache-first" ` for "write" requests.
55+ - This fixes a problem where the default ` fetchPolicy ` would be ` "cache-first" ` for "write" requests.
4856
4957### v2.0.0 (2018/2/17)
5058
5159** Breaking**
5260
53- * ` transformResponse ` has been renamed to be ` transformData `
54- * ` fetchPolicy ` is now determined by the method that you pass in. This change was made to support using
61+ - ` transformResponse ` has been renamed to be ` transformData `
62+ - ` fetchPolicy ` is now determined by the method that you pass in. This change was made to support using
5563 POST methods for read requests, and is unlikely to break your code.
56- * A new prop, ` cacheResponse ` , is used to determine if a response is added to the cache or
64+ - A new prop, ` cacheResponse ` , is used to determine if a response is added to the cache or
5765 not. This is to support using POST methods for read requests, and is unlikely to break your code.
5866
5967** New Features**
6068
61- * A new ` failed ` property is passed to you in the render prop callback. This allows you to
69+ - A new ` failed ` property is passed to you in the render prop callback. This allows you to
6270 quickly determine if a request failed for any reason (be it network errors or "error" status
6371 codes).
6472
6573### v1.1.0 (2018/2/7)
6674
6775** New Features**
6876
69- * ` responseType ` can now be specified as a function. It receives the ` response `
77+ - ` responseType ` can now be specified as a function. It receives the ` response `
7078 as the first argument.
71- * Adds a ` requestKey ` prop.
72- * When the request is "faux-aborted," the error will have a ` name ` equal to ` AbortError ` .
79+ - Adds a ` requestKey ` prop.
80+ - When the request is "faux-aborted," the error will have a ` name ` equal to ` AbortError ` .
7381 This matches the name of the native error, allowing you to write future-proof code that
7482 handles aborted requests.
7583
7684### v1.0.0 (2018/2/4)
7785
7886** Breaking**
7987
80- * The ` responseType ` will now be set to ` "text" ` anytime a response returns
88+ - The ` responseType ` will now be set to ` "text" ` anytime a response returns
8189 with a 204 status code.
82- * The ` responseType ` is no longer used when creating the request key.
90+ - The ` responseType ` is no longer used when creating the request key.
8391
8492### v0.3.0 (2018/2/4)
8593
8694** Changes**
8795
88- * ` fetch-dedupe ` has been abstracted into a separate library. This
96+ - ` fetch-dedupe ` has been abstracted into a separate library. This
8997 does not change the public API of this library.
9098
9199### v0.2.0 (2018/2/1)
92100
93101** New Features**
94102
95- * The render prop will now be passed the ` requestKey ` .
103+ - The render prop will now be passed the ` requestKey ` .
96104
97105### v0.1.0 (2018/2/1)
98106
@@ -101,4 +109,4 @@ named `render`. Accordingly, this library has been updated to use `children` as
101109
102110** Breaking**
103111
104- * ` <Fetch/> ` now uses ` children ` as the render prop, rather than ` render ` .
112+ - ` <Fetch/> ` now uses ` children ` as the render prop, rather than ` render ` .
0 commit comments