JavaScript

Articles relating to JavaScript.

Integrate Twitter Newsletters with API Routes

Last week newsletters started popping up on Twitter profiles, using their recently purchased service, Revue. But how do you create a newsletter and add subscribers from your website? Using Vercel API routes you can start collecting subscribers in minutes. Here's a quick guide.
Continue reading →

Live Cursors with Liveblocks & Next.js

Displaying other users' cursors live on-screen has always been tricky to implement... but no longer! Using Liveblocks on Next.js & Vercel, we can get it working in a matter of minutes. Open this page in another window, side-by-side, to see it in action!
Continue reading →

A Reactive Framework in 40 Lines

So how exactly do React & Vue work? It can be invaluable to understand the internals of a system, which is why in this article I'll be explaining one method to create a basic reactive framework (in just 40 lines of code).
Continue reading →

Dark Mode by Local Sunlight

Dark mode is increasingly appearing as an option on websites, but why not have it enable automatically? We can estimate the sunlight levels at a user's location, and apply the correct theme to soothe their eyes.
Continue reading →