The last RC before SWR 2.0. This release includes several small fixes with one breaking change.
Breaking
In this release, we are dropping IE 11 support, and using ES2018 as the build target. However, when using SWR in a framework or using a bundler (esbuild, Webpack, etc.), you can still target ES5 or using a browserlist configuration to customize this.
The benefit of this change is, we can now use faster native APIs to make SWR more performant, instead of using old alternatives. A benchmark shows a 4.7x speed improvement of the useSWR()
function call during SSR, when we change Object.assign({}, a, b)
to { ...a, ...b }
.
Details can be found in #2249.
What's Changed
- breaking: Update build target to es2018 by @shuding in #2249
- feat: support functional rollbackOnError by @huozhi in #2242
- fix: resolve swr internal imports as external by @huozhi in #2225
- chore: update tests alias to swr subpath exports by @huozhi in #2243
- chore: export MutationFetcher by @ssssota in #2184
- chore: Bump bundler by @huozhi in #2187
New Contributors
Full Changelog: 2.0.0-rc.0...2.0.0-rc.1