Closed w1nklr closed 1 month ago
I wanted to add it to PR #455, but couldn't push it to Leonid's branch, and then it was too late :/
Thanks @w1nklr, this looks good!
I think we should not expand this example further 😅, in general I try to give each example a focus and let it explain 1 thing else you don't see the trees from the forest.
One last idea: how about rewriting the example to for rexample React? All the manual management of document.createElement(...)
etc inside a JSX file looks a bit odd 😁 (I think that was originally copied from a plain JS example).
ping @w1nklr
Sorry, I'm quite busy these times...
Just checking I understood it correctly: you want to introduce a dependency in the example on react and rewrite this (and in the end all) example in react. Correct ?
Yes indeed. But only if you feel like it.
We can leave it as it is for now, it was just an idea for further improvement.
I just updated this one example to react. Let me know if this is what you want.
But build with node (22) fails at test level :(
Thanks, I'll review the code soon.
The node 22 issue is not caused by this PR itself. It seems that there is something changed in the Github Actions or the latest Ubuntu version that it uses, it doesn't support using globals like rollup
inside a project for some reason. I have something similar in an other project. No clue how to fix it though.
The node 22 issue was introduced in v22.5.0
and fixed in v22.5.1
(see https://github.com/nodejs/node/pull/53934)
Great. The checks are green now !
I've had a look at your latest updates, and this looks really neat! I love that you've split the example in three components, that keeps the example very clear and focused. Thanks!
<Fibonacci />
<FibonacciWithFeedback />
<TransferArray />
You're welcome. Thank you for the ping, this gave me the push I needed ;)
As a followup of #439, here comes an example of how to use workerpool.workerEmit() in a browser.
New example (left: before computations, right: with computations):![image](https://github.com/josdejong/workerpool/assets/93762994/7afdd4c1-786b-4b57-935b-498680aecac6)
Enhanced readme to warn that the used
workerpool
package can not be up-to-date and add instructions to install latest package.