Skip to content

Releases: smikhalevski/react-executor

v0.0.27

26 Nov 13:42

Choose a tag to compare

Changelog: v0.0.26...v0.0.27

  • ExecutorAnnotations type was replaced with Record<PropertyKey, any>.

  • Fixed: useExecutor doesn't activate executor if rendered with a new executor key.

v0.0.26

22 Aug 11:57

Choose a tag to compare

Changelog: v0.0.25...v0.0.26

  • React Executor is now a part of MegaStack.

  • CommonJS support was removed.

  • bindAll plugin was removed. All Executor methods are now instance-bound by default.

  • Post-SSR hydration process was refactored:

    • stateParser and stateStringifier options were replaced with a single option serializer.
    • enableSSRHydration was renamed to hydrateExecutorManager.
    • ReadableSSRExecutorManager and PipeableSSRExecutorManager were removed. SSRExecutorManager should be used instead to mimmic their behavior.
  • abortWhen plugin now supports isSustained option teling that every new task is immediately aborted if the last value emitted by the observable was true and the delay has expired.

  • Added invalidateWhen plugin that invalidates the settled executor result when the observable emits true:

import invalidateWhen from 'react-executor/plugin/invalidateWhen';
import windowFocused from 'react-executor/observable/windowFocused';

const executor = useExecutor('test', heavyTask, [
  invalidateWhen(windowFocused),
]);
  • Added lazyTask plugin 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()),
]);
  • synchronizeStorage plugin was replaced with syncBrowserStorage plugin:
import syncBrowserStorage from 'react-executor/plugin/syncBrowserStorage';

const executor = useExecutor('test', 42, [syncBrowserStorage()]);
  • Added syncExternalStore plugin 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.keySerializer was renamed to keyIdGenerator.

  • Executor.toJSON was renamed to getStateSnapshot.

  • key isn't a part of ExecutorState anymore.

v0.0.25

05 Jul 14:09

Choose a tag to compare

Changelog: v0.0.24...v0.0.25

  • aborted event is't published if promise returned from execute() is aborted after the task is completed.

  • Fixed a race condition in the synchronizeStorage plugin that occurred when multiple storage tenants updated the same item at the same time.

v0.0.24

27 May 17:57

Choose a tag to compare

Changelog: v0.0.23...v0.0.24

synchronizeStorage plugin discards malformed state that is read from the storage.

v0.0.23

19 May 17:05

Choose a tag to compare

Changelog: v0.0.22...v0.0.23

  • synchronizeStorage plugin persists annotations to storage when they are changed.

  • Removed esModuleInterop setting.

v0.0.22

12 May 12:07

Choose a tag to compare

Changelog: v0.0.21...v0.0.22

  • synchronizeStorage plugin properly restores executor annotations.

  • Executor.publish signature requires an event object.

v0.0.21

30 Apr 09:21

Choose a tag to compare

Changelog: v0.0.20...v0.0.21

  • Fixed chunking of streaming SSR rendering.

  • Renamed Executor.pendingPromise to Executor.promise.

v0.0.20

26 Mar 15:09

Choose a tag to compare

Changelog: v0.0.19...v0.0.20

Fixed incorrect delay in detachDeactivated.

v0.0.19

24 Mar 14:20

Choose a tag to compare

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 with navigatorOnline and navigatorOffline.

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 to abortPendingAfter.

  • rejectPending was renambed to rejectPendingAfter.

  • resolveWhen was renamed to resolveBy.

  • Added retryActivated plugin that retries the latest task if the executor is activated.

  • retryInvalidated, retryFulfilled, retryRejected and retryBy now support isEager option that force the executor to retry its latest task even if the executor isn't active.

  • invalidateByPeers and invalidatePeers now support both the array of peer executors and a peer-matcher callback.

  • useExecutorSuspense now supports only a single executor as an argument.

  • useExecutorSuspense and useExecutorSubscription now return the executor to enable composition.

v0.0.18

14 Mar 21:45

Choose a tag to compare

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 the ExecutorManager.get().

  • Fixed synchronizeStorage plugin not updating backing storage in some cases.