Skip to content

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

Open
kvpasupuleti wants to merge 1 commit into
alewin:masterfrom
kvpasupuleti:export-worker
Open

Return worker from the useWorker hook along with the promise and the controller#111
kvpasupuleti wants to merge 1 commit into
alewin:masterfrom
kvpasupuleti:export-worker

Conversation

@kvpasupuleti
Copy link
Copy Markdown

No description provided.

}, [killWorker])

return [
workerHook, workerController,
Copy link
Copy Markdown
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?

"0": {
"css": [
{
"file": "styles.af953db5.css",
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants