Releases: smikhalevski/react-executor
v0.0.27
Changelog: v0.0.26...v0.0.27
-
ExecutorAnnotationstype was replaced withRecord<PropertyKey, any>. -
Fixed:
useExecutordoesn't activate executor if rendered with a new executor key.
v0.0.26
Changelog: v0.0.25...v0.0.26
-
React Executor is now a part of MegaStack.
-
CommonJS support was removed.
-
bindAllplugin was removed. AllExecutormethods are now instance-bound by default. -
Post-SSR hydration process was refactored:
stateParserandstateStringifieroptions were replaced with a single optionserializer.enableSSRHydrationwas renamed tohydrateExecutorManager.ReadableSSRExecutorManagerandPipeableSSRExecutorManagerwere removed.SSRExecutorManagershould be used instead to mimmic their behavior.
-
abortWhenplugin now supportsisSustainedoption teling that every new task is immediately aborted if the last value emitted by the observable wastrueand the delay has expired. -
Added
invalidateWhenplugin that invalidates the settled executor result when the observable emitstrue:
import invalidateWhen from 'react-executor/plugin/invalidateWhen';
import windowFocused from 'react-executor/observable/windowFocused';
const executor = useExecutor('test', heavyTask, [
invalidateWhen(windowFocused),
]);- Added
lazyTaskplugin that sets an executor task but doesn't execute it:
import lazyTask from 'react-executor/plugin/lazyTask';
const executor = useExecutor('test', 42, [
lazyTask(async () => await getTheMeaningOfLife()),
]);synchronizeStorageplugin was replaced withsyncBrowserStorageplugin:
import syncBrowserStorage from 'react-executor/plugin/syncBrowserStorage';
const executor = useExecutor('test', 42, [syncBrowserStorage()]);- Added
syncExternalStoreplugin that persists the executor state in the observable external store:
import syncExternalStore from 'react-executor/plugin/syncExternalStore';
const executor = useExecutor('test', 42, [
syncExternalStore(myStore),
]);-
ExecutorManagerOptions.keySerializerwas renamed tokeyIdGenerator. -
Executor.toJSONwas renamed togetStateSnapshot. -
keyisn't a part ofExecutorStateanymore.
v0.0.25
Changelog: v0.0.24...v0.0.25
-
abortedevent is't published if promise returned fromexecute()is aborted after the task is completed. -
Fixed a race condition in the
synchronizeStorageplugin that occurred when multiple storage tenants updated the same item at the same time.
v0.0.24
Changelog: v0.0.23...v0.0.24
synchronizeStorage plugin discards malformed state that is read from the storage.
v0.0.23
Changelog: v0.0.22...v0.0.23
-
synchronizeStorageplugin persists annotations to storage when they are changed. -
Removed
esModuleInteropsetting.
v0.0.22
Changelog: v0.0.21...v0.0.22
-
synchronizeStorageplugin properly restores executor annotations. -
Executor.publishsignature requires an event object.
v0.0.21
Changelog: v0.0.20...v0.0.21
-
Fixed chunking of streaming SSR rendering.
-
Renamed
Executor.pendingPromisetoExecutor.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
ReadonlyExecutorinterface. -
Most plugins now accept an options object instead of separate optional arguments.
-
windowOnlineobservable was replaced withnavigatorOnlineandnavigatorOffline.
const executor = useExecutor('test', heavyTask, [
abortWhen(navigatorOffline)
]);-
Added
windowBlurredobservable. -
notobservable returns the negated version of a boolean observable, ex.not(navigatorOnline).
const executor = useExecutor('test', heavyTask, [
abortWhen(not(windowFocused))
]);-
abortPendingwas renamed toabortPendingAfter. -
rejectPendingwas renambed torejectPendingAfter. -
resolveWhenwas renamed toresolveBy. -
Added
retryActivatedplugin that retries the latest task if the executor is activated. -
retryInvalidated,retryFulfilled,retryRejectedandretryBynow supportisEageroption that force the executor to retry its latest task even if the executor isn't active. -
invalidateByPeersandinvalidatePeersnow support both the array of peer executors and a peer-matcher callback. -
useExecutorSuspensenow supports only a single executor as an argument. -
useExecutorSuspenseanduseExecutorSubscriptionnow return the executor to enable composition.
v0.0.18
Changelog: v0.0.17...v0.0.18
-
Added
detachInactiveplugin. -
Removed executor memoization from
useExecutor. Now executor key is resolved the same way either through the hook or through theExecutorManager.get(). -
Fixed
synchronizeStorageplugin not updating backing storage in some cases.