Nobody parties but me, ok?
visibly angry not down to party. PartyTown solves this by running these third-party scripts in a web worker, so they don’t block the main thread.
That sounds simple enough, but this is one of those (many) things in web development that’s a lot trickier than it sounds.
For one thing, third-party scripts often need to access DOM APIs and the
window object — but you can’t do that from within a Web Worker directly. Plus, the bridge between Web Workers and the main thread has to be async — but third-party scripts expect DOM/window API calls to be synchronous.
Bottom Line: The third-party runs in a worker, but can still call DOM/window APIs without knowing any better — the best of both worlds. Maybe they should rename the library, PartyInTheUSATown?
The hero we deserve [sponsored]
I had that same nightmare again last night.
The one where I get woken up at 2:00 am by 17 Slack notifications, and my phone sounds like the National Guard is knocking my door into the ground:
Prod crashed again.
Different bug this time.
Can’t find it.
Could you hop online for a bit?
Oh wait, that wasn’t a nightmare — that was literally what happened to me every few weeks before my old company finally started using Sentry.
Sentry makes it 100x easier to monitor your app’s errors and performance, so that you can quickly catch and fix issues during the day time — instead of frantically trying to un-crash your app in the middle of the night. Plus, they’ve got individual SDK’s and solid documentation for every major technology, so it’s super simple to set up.
Try 1 month of Sentry’s Business Plan for free with the promo code BYTES, and go back to having normal anxiety dreams about stuff like climate change or being back in middle school.
Such a little thing
Motion One was just released last week, and it bills itself as “the smallest fully-featured animation library for the web.” It was created by Matt Perry, who’s also the creator of Framer Motion (when he’s not playing Chandler in Friends).
This WAAPI-based approach gives Motion One a few key advantages:
Smaller bundle sizes — Because it doesn’t need to force users to download code that’s already present in their browser.
Better value interpolation — Motion One is able to use the browser’s interpolation code, which is typically much better and makes your relevant animations more performant.
Appwrite is an open source Firebase alternative that makes cross platform app development easy. It’s got a realtime database, file storage, serverless functions, numerous authentication methods and an architecture that’s focused on scalability, privacy, security and self-hosting out of the box. [sponsored]
Lots of new animation libraries this week, and Aria created Theatre.js — an animation library for high-fidelity motion graphics.