swr

React Hooks for Data Fetching

MIT License

Downloads
9.7M
Stars
29.3K
Committers
182

Bot releases are visible (Hide)

swr -

Published by shuding almost 4 years ago

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!

swr -

Published by shuding almost 4 years ago

Patches

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

Credits

Huge thanks to @promer94 and @darrenjennings for helping!

swr -

Published by shuding almost 4 years ago

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!

swr -

Published by shuding almost 4 years ago

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!

swr -

Published by shuding almost 4 years ago

Patches

  • Allow passing null as the fetcher function for lazy execution: #730
  • Add test for mutate with async-fn: #739

Credits

Huge thanks to @maggo and @promer94 for helping!

swr -

Published by shuding almost 4 years ago

Patches

  • Add README to examples: #716
  • Feat: make swr more configurable across platform: #690
  • Accept React 17 as a peer dependency: #725

Credits

Huge thanks to @thinceller, @huozhi, and @bcomnes for helping!

swr -

Published by shuding about 4 years ago

Patches

  • Fix: missing dedupe in updaterInterface: #688
  • Doc: fix readme's Request Deduplication example: #699
  • Fix: error should not be cleared while revalidating: #701

Credits

Huge thanks to @huozhi and @Brew-Brew for helping!

swr -

Published by shuding about 4 years ago

Patches

  • Remove unnecessary dependencies from mutate and setSize: #665
swr -

Published by shuding about 4 years ago

Patches

  • Chore: swap fde for dequal: #655
  • Add React and Hook config for ESLint: #270

Credits

Huge thanks to @lukeed and @innocentiv for helping!

swr -

Published by shuding about 4 years ago

Patches

  • Bump handlebars from 4.5.2 to 4.7.6: #646
  • Try fix cannot stop polling by setting refreshInterval (#638): #632
  • Chore: fix error when data tobe 0 null: #622
  • Promote isValidating to the global level of data and error: #569
  • Remove Isomorphic Fetch from Axios Typescript example: #607
  • Add a default fetcher using Fetch API: #367

Credits

Huge thanks to @anc95, @blackarctic, @jmichaliga, and @sergiodxa for helping!

swr -

Published by shuding about 4 years ago

Patches

  • Chore: optimization dispatch: #621
  • Add function key arguments to WeakMap so they trigger revalidation on identity change: #612

Credits

Huge thanks to @anc95 and @ath92 for helping!

swr -

Published by shuding about 4 years ago

Patches

  • Add useDebugValue to show the data label in the React DevTools: #578
  • Fix problem of unnecessary revalidates when resolved data is falsy: #524
  • Added example for SWR Request De-duplication feature: #519
  • Fix: eventsRef should trigger the lastest version of config callbacks: #521
  • Fix useSWRInfinite response type: #584
  • Fix: 'revalidateOnFocus' and 'revalidateOnReconnect' shoule be statful: #583
  • Swr.vercel.app: #605
  • Fix: do not rerender if data unchanged: #464

Credits

Huge thanks to @Kexin-Li, @MHA15, @tanmaylaud, @lintuming, @lynxtaa, @promer94, @thomaswang, and @morgs32 for helping!

swr -

Published by shuding about 4 years ago

Minor Changes

  • New infinite loading API: #435
  • Add microbundle: #487
  • Add persistSize option to useSWRInfinite: #490
  • Revert "add microbundle " (#492): #487
  • Enhance: remove mutate calls from cache: #493
  • Fix page size persistence when remounting: #495
  • Don't retry on error if errorRetryCount is set to 0: #506
  • Fix: check if mounted when trigger rerender: #510
  • Export interfaces used by useSWRInfinite: #511
  • Fix typescript warning: #530
  • Fix: should throw when mutate failed: #557
  • Enhance: fallback to setTimeout when request idle callback is not available: #473
  • Enhance: move online listeners to config (#476): #474

Patches

  • Change name to Vercel: #467
  • Update keyErr on the cache when mutating: #480
  • Test: add test case for error updating in cache when mutate: #481
  • Updated the readme: #513
  • Update link: #516
  • Remove unused command: #544
  • Bump lodash from 4.17.15 to 4.17.19: #531

Credits

Huge thanks to @huozhi, @dominictwlee, @lolPants, @MoeCasts, @markozxuu, @cristianbgp, @ashfaqnisar, @matamatanot, and @Kexin-Li for helping!

swr -

Published by shuding over 4 years ago

Patches

  • Docs: update notes for returned data from mutate section: #394
  • Change mutateCallback type to allow non-promise return value: #406
  • Fix No bound mutate returned by useRequest hook.: #410
  • Fix mutate not disposing older async mutations: #427
  • Create CODE_OF_CONDUCT.md: #432
  • Unmount check: #433
  • Fix spread syntax with defineProperties: #436
  • Remove unused file: #441
  • Build: use es5 syntax for esm build (#444): #443
  • Replace ZEIT with Vercel in examples: #442
  • Update docs to explain dependent fetching with falsy: #449
  • Use initialData in suspense mode if provided: #448
  • Docs: setup issue template: #453
  • Make trigger return a promise resolved to the new cache value: #391

Credits

Huge thanks to @huozhi, @ties-v, @shyamlohar, @TheHolyWaffle, @promer94, @alexandregv, @joshkel, @Narigo, and @sergiodxa for helping!

swr -

Published by shuding over 4 years ago

Patches

  • Updated asset link: #408

Credits

Huge thanks to @leo for helping!

swr -

Published by shuding over 4 years ago

Patches

  • Upgrade Next.js: #324
  • Minor documentation improvements: #321
  • Add Data and Error generics to pagesResponseInterface: #294
  • Remove unused import in example: #338
  • Use latest: #342
  • Test: imporve dynamic polling interval test: #351
  • Update handle in CODEOWNERS: 65449cdc46ac37cdad074c733513933aed43052e
  • Remove the server side suspense warning: #370
  • Change if condition and remove 'do nothing': #356
  • Add Optimistic UI with Immer example: #374
  • Fix return type of mutateCallback: #381
  • Fix axios example unexpected mutation behavior: #380
  • Fix: data inconsist on key change when fetcher is synchronized: #369
  • Update links to Vercel: #385
  • RevalidateOnMount flag that disable automatic revalidation on mount: #225
  • Update README.md: #389

Credits

Huge thanks to @timneutkens, @akx, @Kerumen, @zusinShinpei, @matamatanot, @promer94, @hikaru7719, @sergiodxa, @jericopulvera, @huozhi, @sarupbanskota, and @ciak0 for helping!

swr -

Published by shuding over 4 years ago

Patches

  • Fix polling conditions: #281
  • Change useRequest.js to use mutate: #292
  • Fix 'reconnect' assignment: #297
  • Dedupe extra requests after mutation: #296
  • Use window as a target for online event: #300
  • Bump acorn from 5.7.3 to 5.7.4: #303
  • Update examples/server-render: Use getServerSideProps: #307
  • Document the compare option: #320
  • Hoist side effects out of useSWRPages render fiber: #317
  • Remove keyRef check; add tests: #323

Credits

Huge thanks to @mattfwood, @zhengjitf, @buffaybu, @nulladdict, @matamatanot, @joshkel, and @neolefty for helping!

swr -

Published by shuding over 4 years ago

Minor Changes

  • Expose Cache: #231

Credits

Huge thanks to @sergiodxa for helping!

swr -

Published by shuding over 4 years ago

Patches

  • Add regression test for WeakMap key is null: #273
  • Fix: disable dedupe when trigger/mutate (#279): #271
  • Improve mutate function: #245
  • Add errorRetryCount config option: #277
  • Fixed potential typescript error in examples/axios-typescript: #265

Credits

Huge thanks to @sergiodxa, @dominictwlee, and @Svish for helping!

swr -

Published by shuding over 4 years ago

Patches

  • Fixed return awaits: #216
  • Check if addEventListener and removeEventListener exists: #217
  • ESlint ignore add esm folder: #218
  • Reorganize slow connection code. Make it a tiny bit smaller: #220
  • Fix check for addEventListener existence: #223
  • Allow use custom isEqual method: #219
  • Moving page cache to use a cache map: #221
  • Update README.md: #235
  • Test(typo): fix typo: #244
  • Fix weakmap key is null: #251
  • Fix race condition and add test: #261

Credits

Huge thanks to @vassbence, @r13v, @jinxin0112, @onigoetz, @robinandeer, @lllllllqw, @aequasi, and @darrenjennings for helping!