You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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