DEV Community

Cover image for Web Workers to the Rescue – How to Work with JSON Strings without Blocking User Interactions

Web Workers to the Rescue – How to Work with JSON Strings without Blocking User Interactions

Marabesi on June 10, 2023

Web workers have been around for a while now. But how you use them depends on the type of application you have. One way you might use web workers i...
Collapse
 
iskandarreza profile image
Iskandar Reza

Nice work! Wondering if you've heard of comlink? It's a nice little lib that makes main thread to worker communication even simpler: github.com/GoogleChromeLabs/comlink

Collapse
 
marabesi profile image
Marabesi

yep! comlink is a wrapper that can be used, I took this approach with web workers to understand how to test drive the app first and then improve on top of that.

I think a next step would be to try comlink out!

Thanks for sharing =)

Collapse
 
iskandarreza profile image
Iskandar Reza

Next you'll want to check out the channel messaging API so you can do worker to worker communication, that opens up so many new possibilities! developer.mozilla.org/en-US/docs/W...

Collapse
 
evrtrabajo profile image
Emmanuel Valverde Ramos

Vamos 🚀🚀🚀