Releases: bvaughn/suspense
Releases · bvaughn/suspense
0.0.32
- Improved
useImperativeCacheValue
generics.
0.0.31
- 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
- Add new edge-case externally-managed cache type (
createExternallyManagedCache
) as a convenience wrapper around createCache
.
0.0.29
- Edge case bugfix: Calling
cache
while a value is being loaded will resolve/replace the pending record.
0.0.28
- Add
useImperativeIntervalCacheValue
hook for imperatively loading and subscribing to createIntervalCache
data.
- Add
getValue
and getValueIfCached
methods to createIntervalCache
type.
0.0.27
- 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
- Add
getStatus
and subscribe
methods to interval caches.
- Add
useIntervalCacheStatus
hook for interval caches.
0.0.25
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
- 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).