Uncaught ReferenceError: _toConsumableArray2 is not defined/
[Required] Describe the bug Bug happens when using spread syntax in the function passed to useWorker.
[Optional] To Reproduce Steps to reproduce the behavior:
- Write a function that uses spread syntax
- Pass that function to useWorker to create a worker
- Run worker
- See error
[Required] Expected behavior The worker to run normally without errors.
[Optional] Screenshots If applicable, add screenshots to help explain your problem.
[Optional] Device (please complete the following information):
- OS: Windows
- Browser chrome
- Version 84.0.4147.125 (Official Build) (64-bit)
[Optional] context Here's the Codesandbox: https://codesandbox.io/s/testing-useworker-9rw9j
check if the solution mentioned in #87 fixes your issue
Mentioned here: https://github.com/alewin/useWorker/issues/87#issuecomment-699662483
You can try to write code in a way that, on transpiling should not make your function impure.