Plus Angular gets its own documentary, Nx makes some big changes, and which rich text editor framework should you choose? |
There Are a Lot of Ways to Break Up Long Tasks in JavaScript — Due to how browsers and the event loop work, letting a single task hog the main thread is a quick way to freeze up your site’s UI. Alex explains the problem and uses a simple example to walk through the pros and cons of different solutions from basic use of setTimeout() to requestAnimationFrame(), channel messaging, and Web Workers. Alex MacArthur |
IN BRIEF: Chrome is shipping a new moveBefore DOM method for moving elements around a DOM tree without resetting the element's state. React is already working on using it. Would you like to write PHP inside Vue or React components? You might if you're a Laravel user, and Aaron Francis shows off a way to do it. It's not open source yet, but his demo is pretty cool. Nx user? Nx has a whole new experience for Nx workspaces that's faster, more efficient, and solves a variety of issues with TypeScript editor support for large monorepos. Josh Goldberg explains the differences between ESLint and TypeScript, beyond the obvious. |
RELEASES: ES Module Shims 2.0 – Polyfills import maps and other ES Modules features on top of the baseline native ESM support in browsers. pnpm 10.2 – The alternative, efficient package manager. Turborepo 2.4 |
How to Publish ESM-Based npm Packages with TypeScript — Now that you can use the ES modules (almost) everywhere, it’s worth understanding how to package them up for use with npm. Axel digs into everything you need to know and shares some useful tools too. Dr. Axel Rauschmayer |
Vite with TypeScript — If you’ve created a JavaScript-based React project with Vite and want to get on the TypeScript train, here are the basic steps. Robin Wieruch |
RE2JS 1.0: Linear Time Matching for Regular Expressions — RE2 is a regular expression engine built by Google designed to operate in time proportional to the size of the input, in order to avoid so-called ‘ReDoS’ problems caused by backtracking, and this brings such protection to the browser too. Oleksii Vasyliev |
🍪 CookieConsent 3.1 – A lightweight, pure JS, GDPR-compliant cookie consent mechanism with which to annoy all your users meet regulatory requirements. Happy DOM 17.0 – Cross-runtime JS implementation of a web browser sans UI. Now supports ES modules. remove-unused-vars 0.0.4 – An experimental new tool for removing unused variables from code. get-value 4.0 – Use property paths (a.b.c) get a nested value from an object. mp4-muxer 5.2 – MP4 multiplexer in pure TypeScript with support for the WebCodecs API, video and audio. 🗺️ react-map-gl 8.0 – React friendly API wrapper around MapboxGL JS. (Demo.) 🗓️ Schedule-X 2.17 – Material Design event calendar and date picker. Wasp 0.16 – Wasp is a Rails-like framework using Node, React & Prisma. web-worker 1.5 – Consistent Web Workers in browser and Node. Js_of_ocaml (jsoo) 6.0 – An OCaml to JavaScript compiler. RxDB 16.5 – Offline-first, reactive database for JS apps. |
🎵 A quick musical number.. |
A Protracker Module Player in Pure JavaScript — I’m a sucker for 90s tracker music, JavaScript experiments, and cool Web experiences, and this has all three. If you’re not familiar with tracker music, it’s a way to write music on a grid which triggers the playing of samples. This code manages to parse and play a Protracker file in pure JavaScript. (Note: The image above is of the original Protracker app, this experiment is more minimal and about the code.) srtuss | |