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

Can't use highlighting in a WebWorker #138

Open
georeith opened this issue Oct 23, 2024 · 0 comments
Open

Can't use highlighting in a WebWorker #138

georeith opened this issue Oct 23, 2024 · 0 comments

Comments

@georeith
Copy link

georeith commented Oct 23, 2024

Since the top level fuzzySort.highlight was replaced in favor of result.highlight you can no longer computer results in a WebWorker and highlight them back in the main thread because the highlight function is removed during the structured clone in postMessage().

When you're using something like React it isn't as simple to perform the highlighting in the worker.

In the meantime I'm using React's startTransition to help unblock the UI and it works well, just wanted to note the limitation.

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

No branches or pull requests

1 participant