---
title: "The state of Web Workers"
publication: "JavaScript Weekly"
issue: 546
published_at: "2021-07-09"
canonical_url: "https://javascriptweekly.com/issues/546"
---

Plus fuzzy string matching, Promise.all(), and multiplayer tic tac toe in 640 bytes. |        

#​546 — July 9, 2021 

[Unsubscribe](https://javascriptweekly.com/leave/*|UID|*)|[Read on the Web](https://javascriptweekly.com/issues/546)   

JavaScript Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/ygd79iy9sq1rumkfdqph.jpg)](https://www.smashingmagazine.com/2021/06/web-workers-2021/)  

[The State of Web Workers in 2021](https://www.smashingmagazine.com/2021/06/web-workers-2021/) — The web is typically single-threaded, but two years ago Surma told us [why to always use Web Workers](https://surma.dev/things/when-workers/) to bring multithreading to your solutions despite the difficulties. [Almost every client supports](https://caniuse.com/webworkers) them now, so Surma makes the case again and explains why [Web Workers](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers) deserve a place in your projects. 

Surma   

[How `export default thing` is Different to `export { thing as default }`](https://jakearchibald.com/2021/export-default-thing-vs-thing-as-default/) — When someone like Jake ends up having to chat to the V8 team to figure something out and then learns something, it’s worth following along. Off down the `export` rabbit hole we go... 

Jake Archibald   [![\](https://copm.s3.amazonaws.com/423a5b12.png)](https://www.appsignal.com/tour/uptime-monitoring?utm_source=boostedproductfeature&utm_medium=javascript-weekly&utm_campaign=uptime-monitoring&utm_content=primary) 

[Uptime Monitoring Is Now Available in AppSignal](https://www.appsignal.com/tour/uptime-monitoring?utm_source=boostedproductfeature&utm_medium=javascript-weekly&utm_campaign=uptime-monitoring&utm_content=primary) — Uptime monitoring is the first line of defense against downtime. Ping your apps every minute from 4 locations around the world and receive alerts when something is down. Now you'll know about downtime before your users do. 

AppSignal sponsor   

[`npm audit`: Broken by Design](https://overreacted.io/npm-audit-broken-by-design/) — _“The way `npm audit` works is broken. Its rollout as a default after every `npm install` was rushed, inconsiderate, and inadequate for the front-end tooling.”_ Dan adopts an untypically critical tone but does a good job of demonstrating how vulnerabilities are not all alike when it comes to whether they matter. 

Dan Abramov   

[A Look at Building with Astro](https://css-tricks.com/a-look-at-building-with-astro/) — [Astro](https://astro.build/blog/introducing-astro), which we featured a month ago, is a new framework for building sites where you get to use JavaScript frameworks but sites are rendered in static form. 

Chris Coyier   

[Elementary: React-Inspired Functional, Declarative Audio Applications](https://www.nickwritesablog.com/functional-declarative-audio-applications/) — Can writing audio [DSP](https://en.wikipedia.org/wiki/Digital_signal_processing) software be “_simple, fast and fun_”? Not up until now, but [Elementary](https://www.elementary.audio) intends to change all that, and thus lowering the barriers to entry for this burgeoning field. 

Nick Thompson     

Quick Bits 

- How about a two-player self hosted Tic-tac-toe game in [640 bytes of JavaScript?](https://github.com/shivamMg/tictactinytoe)
- When I see someone [flashing an ESP32 microcontroller from the browser](https://blog.toit.io/flash-your-esp32-from-the-browser-using-web-serial-5eccb1483b9c), it reminds me just how far JavaScript and browsers have come.
- Did you know you can run scripts (written in JavaScript) on a schedule on your Google Sheets spreadsheets? [Here's a Twitter thread explaining how.](https://twitter.com/jsjoeio/status/1411369162971045895) 

Releases 

[Highlight.js 11.1](https://highlightjs.org/) — Web syntax highlighter library.
 [Gatsby 3.9](https://www.gatsbyjs.com/docs/reference/release-notes/v3.9/) — React 'dynamic site generator.'
 [zx 2.0](https://github.com/google/zx) — Better scripting with Node.js.
 [Snowpack 3.8](https://github.com/snowpackjs/snowpack) — Module driven frontend build tool.
 [ckeditor 29.0](https://github.com/ckeditor/ckeditor5/releases/tag/v29.0.0) — Rich text editor framework.
 [Rollup 2.53.0](https://github.com/rollup/rollup) — Next-generation ES module bundler.
 [TIFF 5.0](https://github.com/image-js/tiff) — TIFF image decoder written entirely in JS.    

💻 Jobs  

[Now Hiring: Work with the Best, Building the Best](https://www.econify.com/jobs/Software-Engineer) — The sharpest developers, building the fastest websites. Looking for more, to build more. [Join us](https://www.econify.com/jobs/Software-Engineer). 
Econify   

[Senior Backend Engineer (Berlin / Remote)](https://feather-insurance.com/careers/senior-backend-engineer) — Honest, simple insurance. Modern TypeScript stack. Join our small team, take ownership and push your ideas. 
Feather   

[Find a Job Through Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-javascriptweekly%29&utm_content=find-your-next-job) — Create a profile on Hired to connect with hiring managers at growing startups and Fortune 500 companies. It's free for job-seekers. 
Hired    

📖 Articles, Opinions & Tutorials  

[TypeScript and Native ESM on Node.js](https://2ality.com/2021/06/typescript-esm-nodejs.html) — This topic comes up time and time again, and for good reason - it’s the way things are headed. Dr. Axel covers the essentials you need to know in order to use and produce native ECMAScript/ES modules on Node when using TypeScript. 

Dr. Axel Rauschmayer   

[How to Use `Promise.all()`](https://dmitripavlutin.com/promise-all/) — Handle multiple promises at once, in parallel, and then get the result in a single aggregate array. 

Dmitri Pavlutin   

[Ultimate Guide to Building a UI Library: Building Robust Components](https://www.telerik.com/blogs/ultimate-guide-to-building-ui-component-library-part-3-components?utm_medium=cpm&utm_source=jsweekly&utm_campaign=kendo-ui-react-blog-guide-building-robust-components) — TJ VanToll shares what he’s learned from over a decade of writing and working with UI components. [Go to the blog series](https://www.telerik.com/blogs/ultimate-guide-to-building-ui-component-library-part-3-components?utm_medium=cpm&utm_source=jsweekly&utm_campaign=kendo-ui-react-blog-guide-building-robust-components%20). 

Progress KendoReact sponsor   

[When a Click is Not Just a Click](https://css-tricks.com/when-a-click-is-not-just-a-click/) — There are nuances to consider when listening for a click event (such as a ‘click’ sent from a keyboard versus one from a mouse). This post dives into how you can distinguish different types, and what opportunities arise from identifying them. 

Travis Almand   

▶[Using Deno Deploy to Release Super Fast Cloud Functions](https://www.youtube.com/watch?v=yZDvE0mP4Y4) — Jack promises a look into the “potential JavaScript future” by building a chat app using [Deno](https://deno.land/) (a Node-a-like built by Node’s original author, no less) and deploying it on the [Deno Deploy](https://deno.com/deploy) platform. This is easy to understand and follow along with, and the approach taken feels so _natural._ 

Jack Herrington   

[Breaking Down Bulky Builds with Netlify and Next.js](https://www.smashingmagazine.com/2021/06/breaking-down-bulky-builds-netlify-nextjs/) — Using Next.js’ Incremental Static Regeneration (ISR) coupled with on-demand builders and Netlify’s Next on Netlify build plugins to create a site that builds certain routes only when needed, cutting the build time down dramatically. 

Átila Fassina   

[The Ultimate Guide to Cardinality for Observability](https://go.lightstep.com/register-guide-to-cardinality-co21?utm_campaign=js&utm_source=cooper&utm_medium=Email) 

Lightstep sponsor   

[How to Structure a Large Scale Vue.js App](https://vueschool.io/articles/vuejs-tutorials/how-to-structure-a-large-scale-vue-js-application/) 
Daniel Kelly   

[What Is WebAssembly — and Why Are You Hearing So Much About It?](https://thenewstack.io/what-is-webassembly/) 
Mary Branscombe     

🛠 Code & Tools      

[html2canvas 1.0: A JavaScript HTML Renderer](https://html2canvas.hertzen.com/) — Take screenshots of pages or elements of pages and render them to canvas. There’s a live demo to the bottom right of the homepage. [GitHub repo](https://github.com/niklasvh/html2canvas). 

Niklas von Hertzen   

[pdfmake: Client/Server Side PDF Generation in Pure JavaScript](https://github.com/bpampuch/pdfmake) — There’s a [live playground](http://pdfmake.org/playground.html) of it in action, plus [lots of code examples](https://github.com/bpampuch/pdfmake/tree/master/examples) of how to use it to various ends. Built on top of [pdfkit](https://github.com/foliojs/pdfkit). 

Bartek Pampuch   

[Fuzzball: Fuzzy String Matching Library](https://github.com/nol13/fuzzball.js) — To tackle those cases where what’s typed isn’t _quite_ what’s indexed. There’s a neat tree-themed [Web-based demo.](https://nol13.github.io/fuzzball.js/) GPL licensed. 

Nolan   

[Understanding and Preventing Common Security Vulnerabilities](https://buildkite.com/blog/understanding-and-preventing-common-security-vulnerabilities?utm_campaign=CPress&utm_source=ppc&utm_medium=cp-javascript&utm_term=security&utm_content=vulnerabilities-blog) — Join Buildkite on a tour of some of the most common security problems companies face, and how you can prevent them. 

Buildkite sponsor   

[Mantine 2.0: Full Featured React Component Library](https://mantine.dev/) — An MIT licensed, TypeScript-based collection of over 100 components and hooks with native dark theme support and a focus on usability and accessibility. Plenty of documentation and examples. 

Mantine Team   

[imask.js: A Vanilla JavaScript Input Mask](https://imask.js.org/) — Rather than validate the syntax of input fields, how about preventing users from even entering invalid values? 

imaskjs   

[TypeBox: JSON Schema Type Builder with Static Type Resolution for TypeScript](https://github.com/sinclairzx81/typebox) — A type builder library that creates in-memory JSON Schema objects that can be statically resolved to TypeScript types. 

Haydn Paterson   

[fzstd: High Performance Zstandard Decompression in a Pure JS Package](https://github.com/101arrowz/fzstd) 
Arjun Barrett   

[Johnny Five 2.1: A JavaScript Robotics and IoT Programming Framework](https://github.com/rwaldron/johnny-five) 
Rick Waldron   

[Vue 3 Starter: An Opinionated Starter Template for Vue.js Projects](https://github.com/kutia-software-company/vue3-starter) 
Gentrit Abazi         

Published by [Cooperpress](https://cooperpress.com/) and edited by [Peter Cooper](https://twitter.com/peterc) 

'JavaScript' is a trademark of Oracle Corporation in the US
We are not endorsed by or affiliated with Oracle. 

[Change your email address](https://javascriptweekly.com/edit_subscription/*|UID|*) or [stop getting this newsletter](https://javascriptweekly.com/leave/*|UID|*). 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
