Skip to content

更新日志

请访问 SWR release page 查看所有的历史版本。

0.5.6

发布于 Tue May 04 2021.

Patches

  • fix #1056: #1058

Credits

Huge thanks to @promer94 for helping!

0.5.4

发布于 Sat Mar 20 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

发布于 Sun Mar 14 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

发布于 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

发布于 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!