UseWorker Versions Save

⚛️ useWorker() - A React Hook for Blocking-Free Background Tasks

@koale/[email protected]

2 years ago

Patch Changes

  • 54ba71d: fix #108 ( multiple external dependencies )

4.0.1

3 years ago

removed local dependencies #98 feature solves: #104, #105

3.4.0

3 years ago
  • Added local dependencies #98 @zant

3.2.1

3 years ago

🐛 Bugfix

3.2.0

3 years ago

🎁 Features

  • transferable: 'auto' option docs now support OffscreenCanvas type ( thanks @ophirg )

3.1.0

3 years ago

🎁 Features

  • transferable option docs #46 #47 thanks to @gonzachr, and his proposal

3.0.0

4 years ago

Thanks to @IljaDaderko @Pigotz @gonzachr @JonatanSalas @z4o4z for the contribution.

🐛 Bugfix

  • Avoid useWorker unnecessary re-render

🎁 Features

  • autoTerminate option docs

⚡ Breacking changes https://github.com/alewin/useWorker/issues/36

  • The parameters returned by the hook change:

Before

const [sortWorker, status, kill] = useWorker(sortDates);

After

const [sortWorker, { status, kill }] = useWorker(sortDates);
  • The name of the option dependencies changes to remoteDependencies

Before

const [sortWorker] = useWorker(sortDates, { dependencies: ["www.google.com/script.js"] );

After

const [sortWorker] = useWorker(sortDates, { remoteDependencies: ["www.google.com/script.js"] );

These changes allow the addition of new features ( Roadmap 3.0.0 )

3.0.0-beta.3

4 years ago

workerController as second parameter

3.0.0-beta.2

4 years ago

Features

  • add autoTerminate option param

3.0.0-beta

4 years ago

Bugfix

Why on each call to the worker the dependencies are re-fetched? https://github.com/alewin/useWorker/issues/33

Breacking changes:

Before: the reference to the function workerHook changes each time the workerStatus changes, furthermore, since "options" is not a primitive variable, it causes a rerender every time the component that integrated the hook was updated.

After: the hook updates only when options and worker function changes