Sourced from swr's releases.
v2.0.3
Patches
fix: parameters passed to subscribe is inconsistent with its declaration by
@hong24in vercel/swr#2353fix: when inifinite key changes, should use cached pagesize instead of initialSize by
@promer94in vercel/swr#2386fix: make compare function only compare data (#2375) by
@Retrospectionand@promer94in vercel/swr#2387 vercel/swr#2389fix: initial loading state should be false with revalidation is disabed by
@promer94in vercel/swr#2382fix: Ensure hydration matches the SSR result during streaming by
@shudingin vercel/swr#2391Chores
- ci: only run release when tags pushed by
@promer94in vercel/swr#2388- unify
-characters in README.md by@JanKaiferin vercel/swr#2334New Contributors
@hong24made their first contribution in vercel/swr#2353@Retrospectionmade their first contribution in vercel/swr#2387@JanKaifermade their first contribution in vercel/swr#2334Full Changelog: https://github.com/vercel/swr/compare/v2.0.2...v2.0.3
v2.0.2
Patches
- fix: delay revalidation if a key is already active and has error by
@promer94in vercel/swr#2338- fix: createCacheHelper type by
@promer94in vercel/swr#2365Chores
- release workflow by
@huozhiin vercel/swr#2374, vercel/swr#2381, vercel/swr#2383, vercel/swr#2384, vercel/swr#2385Full Changelog: https://github.com/vercel/swr/compare/v2.0.1...v2.0.2
v2.0.1
In this patch release, we majorly improved typing support and SWR can infer the types based on the configuration.
- When the
suspenseoption istrue, the returneddatawill excludeundefinedand theisLoadingwill always befalse.- When the
fallbackDataoption is provided, the returneddatawill be the same type offallbackData, and theisLoadingwill always befalse.Here's a demo for it:
https://user-images.githubusercontent.com/4800338/213288879-ffbeeeb5-aca5-4a65-8229-69fbf9b0bf70.mp4
What's Changed
- types: make FullConfiguration generic by
@huozhiin vercel/swr#2273- type: enforce array literal as tuple by
@promer94in vercel/swr#2283
... (truncated)
903de33
2.0.36fa714b
fix: Ensure hydration matches the SSR result during streaming (#2391)77f922f
unify - characters in README.md (#2334)d603bb6
fix: initial loading state should be false with revalidation is disabed
(#2382)cc97171
test: add test case for #2375
(#2389)e188ad9
fix: make compare function only compare data (#2375)
(#2387)8847ddc
ci: only run release when tags pushed (#2388)8cc7932
fix: when inifinite key changes, should use cached pagesize instead of
initia...33954d7
fix: parameters passed to subscribe is inconsistent with its declaration
(#2353)c0090ab
build: fix typos in workflow yml (#2385)