Nobody parties but me, ok?
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]
Josh Comeau wrote about Designing beautiful shadows in CSS -- and he's not talking about the inappropriate shadow puppets you made with your flashlight at summer camp (we think).
Lots of new animation libraries this week, and Aria created Theatre.js -- an animation library for high-fidelity motion graphics.
Delivered to 70,048 developers every Monday
This is the first ever newsletter that I open a music playlist for and maximize my browser window just to read it in peace. Kudos to @uidotdev for great weekly content.
The Bytes newsletter is a work of art! It's the only dev newsletter I'm subscribed too. They somehow take semi boring stuff and infuse it with just the right amount of comedy to make you chuckle.
Bytes has been my favorite newsletter since its inception. It's my favorite thing I look forward to on Mondays. Goes great with a hot cup of coffee!
I subscribe to A LOT of dev (especially JS/TS/Node) newsletters and Bytes by @uidotdev is always such a welcomed, enjoyable change of pace to most (funny, lighthearted, etc) but still comprehensive/useful.
Literally the only newsletter I’m waiting for every week.
Bytes is the developer newsletter I most look forward to each week. Great balance of content and context! Thanks @uidotdev.
The sense of humor and structure of the Bytes Newsletter is first class and the information that comes with it is enough to make a mini course.
Very few newsletters manage to be useful and not very boring. @uidotdev manages to achieve these pretty effortlessly. You can almost see Tyler chuckle as he writes them.