Skip to content

Change Log

Please visit the SWR release page for all history releases.

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!

0.5.3

Published on Sat Mar 13 2021.

Patches

  • Fix dequal vendor: #1027
  • Test: refactor tests for configs: #1006
  • Test: refactor use-swr-error.test.tsx: #1031
  • Micro optimizations: #1018
  • Fix: support multiple useSWRInfinite hooks in a page: #1009

Credits

Huge thanks to @promer94 and @koba04 for helping!

0.5.1

Published on Wed Mar 10 2021.

Patches

  • Fix: revalidate with initialData when changing the key: #961
  • Update CODEOWNERS: dd1bcf99daeacb167b31a7da9547c39ae4452d95
  • Allow passing undefined config: #1022
  • Make swr zero dependency: #1024

Credits

Huge thanks to @koba04 and @huozhi for helping!

0.5.0

Published on Tue Mar 09 2021.

Minor Changes

  • Types: makes types fn and config and getKey more strictly: #946
  • Fix: do not cache when mutate throws an error synchronously: #977
  • Perf: avoid unnecessary re-renders with the suspense mode: #979
  • Fix: do not depend on navigator.onLine; code optimizations: #1004
  • Fix: sync mutations are applied independently: #1003
  • Fix: sync cache only on compare returns true: #907
  • Optimize isValidating status: #967
  • Clean up types: #1016
  • Enable typescript strict mode: #1010

Patches

  • Update README.md: #974
  • Refactor: move DOM event handlers into web-preset: #972
  • Add-infinite-scroll-example: #970
  • Refactor: add the register prefix to onFocus and onReconnect: #993
  • Add example using useSWRInfinite: #968
  • Test: refactor use-swr-cache.test.tsx: #932
  • Using vite2 and add playground to master: #995
  • Test: refactor use-swr-config-callbacks.test.tsx: #933
  • Keep old esm directory structure: #1011

Credits

Huge thanks to @koba04, @huozhi, @Kexin-Li, @promer94, @dingran, and @ramyareye for helping!

0.4.2

Published on Mon Feb 08 2021.

Patches

  • Chore: add comments that revalidate will be deprecated: #937
  • Remove legacy useSWRPages types: #938
  • Test: fix flaky tests for focus and location mutation: #944
  • Refactor: rename from waitForDedupingInterval to waitForNextTick: #960
  • Fix: checking if document is defined: #963

Credits

Huge thanks to @koba04 for helping!