Skip to content

Releases: smikhalevski/react-executor

v0.0.21

30 Apr 09:21
Compare
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
Compare
Choose a tag to compare

Changelog: v0.0.19...v0.0.20

Fixed incorrect delay in detachDeactivated.

v0.0.19

24 Mar 14:20
Compare
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
Compare
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.

v0.0.17

02 Jul 15:13
Compare
Choose a tag to compare

Changelog: v0.0.16...v0.0.17

  • Added Executor.pendingPromise which holds the promise of the pending task execution, or null if there's no pending task execution.

  • Executor.getOrDefault() can be called without an argument, default value is set to undefined 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

20 Jun 21:24
Compare
Choose a tag to compare

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 by Suspence. By default, non-fulfilled pending executors are awaited:

useExecutorSuspense(myExecutor, executor => !executor.isFulfilled);

v0.0.15

09 Jun 16:31
Compare
Choose a tag to compare

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 time nextHydrationScript was called.

v0.0.14

02 Jun 11:41
Compare
Choose a tag to compare

Changelog: v0.0.13...v0.0.14

  • Added abortWhen, resolveWhen, and retryWhen plugins, that take an Observable 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 and rejectPending 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

30 May 22:43
Compare
Choose a tag to compare

Changelog: v0.0.12...v0.0.13

Fixed incomplete SSR hydration bug.

v0.0.12

27 May 21:21
Compare
Choose a tag to compare

Changelog: v0.0.11...v0.0.12

Fixed backward compatibility bug.