Skip to content

v3.0.1

Choose a tag to compare

@I-am-abdulazeez I-am-abdulazeez released this 25 Jun 09:46
· 31 commits to main since this release

[3.0.1] - 2026-06-24

Fixed

  • Added cancel() method to AsyncChunk — cancels any in-flight request and sets loading to false immediately
  • Added isCancelled flag in fetchData — prevents cancelled async closures from setting data after cancellation
  • useAsyncChunk hook now calls cancel() when enabled flips from true to false
  • useAsyncChunk hook now uses setParams() instead of reload() when enabled flips from false to true and params are present — fixes fetch not triggering when currentParams was empty
  • setParams() and reload() now reset isCancelled flag before starting a new fetch

Added

  • cancel: () => void to AsyncChunk interface

Use case unlocked

  • Factory pattern (createXChunk) now works correctly with enabled: isOpen for modal data fetching — no background fetching after modal close, no stale data on reopen