Skip to content

Change Log

Please visit the SWR release page for all history releases.

1.0.0-beta.9

Published on Tue Jul 27 2021.

Major Changes

  • Move infinite types to swr/infinite and deprecate old ones: #1272
  • Drop legacy types: #1276
  • Breaking: drop the default fetcher: #1304

Minor Changes

  • Feat: add getInfiniteKey to mutate the cache for useSWRInfinite: #1257
  • Rename isDocumentVisible to isVisible: #1308

Patches

  • Fix types generate: #1266
  • Add test case that covers #1286: #1297
  • Enhance: simplify deno detection: #1299
  • Refine createCache: #1283
  • Fix useSWRInfinite doesn't revalidate the first page: #1301
  • Code structure refactoring: #1303

Credits

Huge thanks to @huozhi and @koba04 for helping!

1.0.0-beta.8

Published on Tue Jul 06 2021.

Major Changes

  • Sub-packages and immutable hook: #992

Patches

  • Add condition to check if window.addEventListener exists for React Native compatibility: #1234
  • Chore: bump typescript to use ts-expect-error instead of ts-ignore: #1239
  • Enhance: add $ prefix for non-major keys: #1174
  • Fix: fail accessing navigator on Node: #1254
  • Chore: fix to run the build script multiple times: #1255
  • Test: run concurrent rendering tests with React v18 alpha: #1259
  • Fix: ignore .d.ts in dist/ for ESLint: #1258
  • Enhance: use ts for testing: #1260
  • Chore: add watch scripts for sub packages to build them: #1261
  • Fix typo in use-swr: #1267
  • Chore: fix type SWRHookWithdMiddleware to SWRHookWithMiddleware: #1268

Credits

Huge thanks to @javascripter, @koba04, @huozhi, and @pa-rang for helping!

1.0.0-beta.7

Published on Tue Jun 22 2021.

Minor Changes

  • Adopt bunchee as bundler: #1025
  • Custom cache provider: #1017
  • Middleware: #1160

Patches

  • Test: refactor use-swr-loading.test.tsx: #1057
  • Test: refactor use-swr-local-mutation.test.tsx: #1059
  • Fix #1056: #1058
  • Test: refactor use-swr-offline.test.tsx: #1063
  • Allow setting the generic on mutate(): #1069
  • Read cache during render: #794
  • Code refactoring: #1077
  • Add --no-sourcemap: #1079
  • Fix mutate: #1075
  • Revert #1024: #1085
  • Fix: race problem when in dedupingInterval: #1088
  • Bug fixes: #1096
  • Test: refactor use-swr-refresh.test.tsx: #1103
  • Docs: optimistic UI examples comments more clearer: #1102
  • Fix setting null cache in useSWRInfinite: #1110
  • Test: refactor use-swr-revalidate.test.tsx: #1111
  • Test: refactor use-swr-suspense.test.tsx: #1113
  • Build: upragde bundler: #1121
  • Replace deprecated types with latest types in axios-typescript example: #1128
  • Add saveData to slowConnection: #1130
  • Clean code: #1145
  • Update bound mutate readme: #1127
  • Code optimizations: #1150
  • Enhance: support exports field: #1154
  • Fix global mutate generic: #1159
  • Build(deps): bump hosted-git-info from 2.8.5 to 2.8.9: #1164
  • Enhance: upgrade ts lint config: #1169
  • Build(deps): bump browserslist from 4.16.3 to 4.16.6: #1181
  • Fix: autocomplete suggestions example: #1183
  • Build(deps): bump ws from 7.4.2 to 7.4.6: #1184
  • Update README.md: #1203
  • Fix typo in placeholder: #1206
  • Update package.json: #1205
  • Build(deps): bump acorn from 6.3.0 to 6.4.2: #1210
  • Build(deps): bump y18n from 4.0.0 to 4.0.3: #1209
  • Build(deps): bump lodash from 4.17.19 to 4.17.21: #1208
  • Build(deps): bump glob-parent from 5.1.0 to 5.1.2: #1207
  • Add codeowner @huozhi: #1221

Credits

Huge thanks to @huozhi, @koba04, @promer94, @nstepien, @MoonBall, @mkrtchian, @eunsukimme, @Tak-Iwamoto, @meeoh, and @teinett for helping!

0.5.6

Published on Mon May 03 2021.

Patches

  • fix #1056: #1058

Credits

Huge thanks to @promer94 for helping!

0.5.4

Published on Fri Mar 19 2021.

Patches

  • Refactor: fix a react-hooks/exhaustive-deps warning: #1035
  • Test: refactor use-swr-focus.test.tsx: #1036
  • Test: refactor use-swr-infinite.test.tsx: #1039
  • Export default SWR config to allow more flexible extensions: #1023
  • Test: refactor use-swr-integration.test.tsx: #1049
  • Fix: invalid invocation on raf: #1051
  • Types: expose KeyLoader: #1054
  • Test: refactor use-swr-key.test.tsx: #1055

Credits

Huge thanks to @koba04, @jakubriedl, and @huozhi for helping!