Releases: smikhalevski/react-executor
v0.0.21
Changelog: v0.0.20...v0.0.21
-
Fixed chunking of streaming SSR rendering.
-
Renamed
Executor.pendingPromise
toExecutor.promise
.
v0.0.20
Changelog: v0.0.19...v0.0.20
Fixed incorrect delay in detachDeactivated
.
v0.0.19
Changelog: v0.0.18...v0.0.19
-
Added
ReadonlyExecutor
interface. -
Most plugins now accept an options object instead of separate optional arguments.
-
windowOnline
observable was replaced withnavigatorOnline
andnavigatorOffline
.
const executor = useExecutor('test', heavyTask, [
abortWhen(navigatorOffline)
]);
-
Added
windowBlurred
observable. -
not
observable returns the negated version of a boolean observable, ex.not(navigatorOnline)
.
const executor = useExecutor('test', heavyTask, [
abortWhen(not(windowFocused))
]);
-
abortPending
was renamed toabortPendingAfter
. -
rejectPending
was renambed torejectPendingAfter
. -
resolveWhen
was renamed toresolveBy
. -
Added
retryActivated
plugin that retries the latest task if the executor is activated. -
retryInvalidated
,retryFulfilled
,retryRejected
andretryBy
now supportisEager
option that force the executor to retry its latest task even if the executor isn't active. -
invalidateByPeers
andinvalidatePeers
now support both the array of peer executors and a peer-matcher callback. -
useExecutorSuspense
now supports only a single executor as an argument. -
useExecutorSuspense
anduseExecutorSubscription
now return the executor to enable composition.
v0.0.18
Changelog: v0.0.17...v0.0.18
-
Added
detachInactive
plugin. -
Removed executor memoization from
useExecutor
. Now executor key is resolved the same way either through the hook or through theExecutorManager.get()
. -
Fixed
synchronizeStorage
plugin not updating backing storage in some cases.
v0.0.17
Changelog: v0.0.16...v0.0.17
-
Added
Executor.pendingPromise
which holds the promise of the pending task execution, ornull
if there's no pending task execution. -
Executor.getOrDefault()
can be called without an argument, default value is set toundefined
in this case. -
Updated parallel-universe to fix off-by-one error triggered when a listener is unsubscribed during an event publish.
v0.0.16
Changelog: v0.0.15...v0.0.16
-
Fixed initial value persistence in storage.
-
Promises retuned by
Executor.execute
don't trigger unhandled errors when rejected. -
useExecutorSuspense
accepts a condition under which executors are awaited bySuspence
. By default, non-fulfilled pending executors are awaited:
useExecutorSuspense(myExecutor, executor => !executor.isFulfilled);
v0.0.15
Changelog: v0.0.14...v0.0.15
-
Added CSP nonce support to
SSRExecutorManager
. -
SSRExecutorManager.nextHydrationScript()
returns a script source that hydrates the client with the state accumulated during SSR, or an empty string if there are no state changes since the last timenextHydrationScript
was called.
v0.0.14
Changelog: v0.0.13...v0.0.14
-
Added
abortWhen
,resolveWhen
, andretryWhen
plugins, that take anObservable
and abort, resolve, or retry the executor depending on the value pushed to its listeners. -
Removed
retryFocused
.retryWhen
should be used instead:
import retryWhen from 'react-executor/plugin/retryWhen';
import windowFocused from 'react-executor/observable/windowFocused';
useExecutor('test', heavyTask, [
retryWhen(windowFocused)
]);
- Added
abortPending
andrejectPending
plugins that abort the pending task if the execution takes too long:
import abortPending from 'react-executor/plugin/abortPending';
useExecutor('test', heavyTask, [
abortPending(10_000)
]);
- Fixed XSS-prone hydration script.
v0.0.13
Changelog: v0.0.12...v0.0.13
Fixed incomplete SSR hydration bug.
v0.0.12
Changelog: v0.0.11...v0.0.12
Fixed backward compatibility bug.