Uncaught ReferenceError: _toConsumableArray2 is not defined/
buitrbao222 opened this issue · 2 comments
buitrbao222 commented
[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
ashish-r commented
Mentioned here: #87 (comment)
You can try to write code in a way that, on transpiling should not make your function impure.