Skip to content

Releases: bvaughn/suspense

0.0.33

17 Apr 19:14
Compare
Choose a tag to compare
  • README changes

0.0.32

17 Apr 19:14
Compare
Choose a tag to compare
  • Improved useImperativeCacheValue generics.

0.0.31

17 Apr 19:14
Compare
Choose a tag to compare
  • Add optional immutable config param to createCache to enable optimizing rendering performance for immutable caches. (See this Loom video for background information.)

0.0.30

22 Mar 15:46
Compare
Choose a tag to compare
  • Add new edge-case externally-managed cache type (createExternallyManagedCache) as a convenience wrapper around createCache.

0.0.29

21 Mar 13:28
Compare
Choose a tag to compare
  • Edge case bugfix: Calling cache while a value is being loaded will resolve/replace the pending record.

0.0.28

20 Mar 14:37
Compare
Choose a tag to compare
  • Add useImperativeIntervalCacheValue hook for imperatively loading and subscribing to createIntervalCache data.
  • Add getValue and getValueIfCached methods to createIntervalCache type.

0.0.27

18 Mar 03:24
Compare
Choose a tag to compare
  • Removed useWeakRef config option for createCache and replaced with getCache option in order to support LRU type caches in addition to WeakRef based caches. Thanks to @cevr for contributing to this release!

0.0.26

16 Mar 14:01
Compare
Choose a tag to compare
  • Add getStatus and subscribe methods to interval caches.
  • Add useIntervalCacheStatus hook for interval caches.

0.0.25

16 Mar 14:01
Compare
Choose a tag to compare

Parameters passed to createCache methods load and getKey are no longer spread in order to avoid potential parameter mismatch caused by optional parameters.

Before:

createCache<[bool: boolean, num: number, str: string], boolean>({
  getKey: async (bool, num, str) => {
    // ...
  },
  load: async (bool, num, str) => {
    // ...
  }
});

After:

createCache<[bool: boolean, num: number, str: string], boolean>({
  // Note the added [] wrapper
  getKey: async ([bool, num, str]) => {
    // ...
  },
  load: async ([bool, num, str]) => {
    // ...
  }
});

0.0.24

16 Mar 14:01
Compare
Choose a tag to compare
  • Refactored internal structure of Deferred type to expose promise rather than proxy it.
  • Expose several additional low-level utilities for working with Record values (useful for creating custom caches).