Skip to content

Releases: vercel/swr

0.5.4

19 Mar 19:19
fa676db
Compare
Choose a tag to compare

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

13 Mar 16:01
766718a
Compare
Choose a tag to compare

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

10 Mar 15:49
c6cfdcf
Compare
Choose a tag to compare

Patches

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

Credits

Huge thanks to @koba04 and @huozhi for helping!

0.5.0

09 Mar 10:31
43b2920
Compare
Choose a tag to compare

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

08 Feb 13:55
5e82bb6
Compare
Choose a tag to compare

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!

0.4.1

28 Jan 19:50
67c3b25
Compare
Choose a tag to compare

Patches

  • Enhance: let config.isPaused works with react state: #871
  • Fix: add protection for navigator: #877
  • Ci: add GitHub Actions for CI: #879
  • Ci: remove Travis CI: #887
  • Docs: add isPaused() into the options: #888
  • Update default fetcher documentation in README.md: #891
  • Fix: revalidateOnFocus not working on '< iOS 14': #889
  • Refactor: use getter functions to avoid unnecessary re-renders: #890
  • Fix: add server check back for rAF: #899
  • Fix: react-hooks/exhaustive-deps warnings: #886
  • Test: add a test for useSWRInfinite with initialData: #894
  • Separate tests: #901
  • Refactor: fix all react-hooks/exhaustive-deps warnings in tests: #902
  • Docs: use a fake GraphQL endpoint instead of graph.cool: #904
  • Refactor: fix all react-hooks/exhaustive-deps warnings in useSWRInfinite: #905
  • Fix the revalidation condition of the first page: #895
  • Check key before calling callback: #856
  • Chore: format files: #915
  • Chore: rm duplicated tests: #914
  • Test: recognize type definition for screen of testing-library/react: #903
  • Chore: add a comment why fetcher accepts null: #918
  • Refactor: fix all react-hooks/exhaustive-deps warnings in useSWR: #927

Credits

Huge thanks to @huozhi, @koba04, @mcamis, @joshuakimDwan, @joakimgrr, and @promer94 for helping!

0.4.0

07 Jan 16:46
ec55b66
Compare
Choose a tag to compare

Minor Changes

  • Feature: provide config.isPaused indicating idle state and stop revalidation: #845
  • First page of useSWRInfinite should reuse the cache from useSWR: #799

Patches

  • Keep isValidating be true when there are two concurrent requests: #817
  • Fix act: #839
  • Fix: clear refresh timer on effects change and check it on starting new timer: #853
  • Add test for #852: #855

Credits

Huge thanks to @huozhi, @MoonBall, and @promer94 for helping!

0.3.11

20 Dec 17:58
7158af2
Compare
Choose a tag to compare

Patches

  • Fix #832: #833
  • Test(fetch) add test for default fetcher: #834

Credits

Huge thanks to @promer94 and @darrenjennings for helping!

0.3.10

19 Dec 13:19
b0b75b9
Compare
Choose a tag to compare

Patches

  • Fix: mark isValidating as false when key is falsy: #757
  • Fix README.md typo: #783
  • Fix: do mount check in config callback: #787
  • Update api-hooks example README.md: #790
  • Return '@null' if args is null ASAP: #767
  • Bump ini from 1.3.5 to 1.3.8: #806
  • Close #830: #831

Credits

Huge thanks to @huozhi, @mingcenwei, @promer94, @CrutchTheClutch, and @matamatanot for helping!

0.3.9

17 Nov 08:58
6b8b401
Compare
Choose a tag to compare

Patches

  • Replace rIC with rAF: #744
  • Fix race condition when calling mutate synchronously: #735
  • Refactor: support SSR in Deno: #754
  • Fix eslint error: #768
  • Fix mutateCallback types: #745
  • Add CodeSandbox CI: #769
  • Dispatch's payload type is actionType and run lint: #772
  • Fix suspense: #777

Credits

Huge thanks to @ije, @umidbekkarimov, @matamatanot, and @promer94 for helping!