Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return worker from the useWorker hook along with the promise and the controller #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

KVPasupuleti
Copy link

No description provided.

@@ -166,6 +166,6 @@ export const useWorker = <T extends (...fnArgs: any[]) => any>(
}, [killWorker])

return [
workerHook, workerController,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unlike a state ( "useState" ), a ref, does not trigger a re-render, so even if we change "worker.current" whoever integrates the useWorker hook will probably not have access to the latest worker.current ref... but maybe I'm wrong, did you have a moment to check it?

@@ -104,16 +104,16 @@
"0": {
"css": [
{
"file": "styles.af953db5.css",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ops my fault, we should add the .docusaurus inside .gitignore

@alewin
Copy link
Owner

alewin commented Dec 11, 2022

Reminder:
@alewin fix this PR, and merge it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants