Million.js v2.5.1

Million.js v2.5.1

AIDEN BAI (opens in a new tab) JUL 21 2023

💸

We're actively looking for and paying contributors for Million.js. Check out our active bounties (opens in a new tab)

Million.js v2.5.1 brings a ton of new features and bug fixes! Make sure to upgrade your Million.js version to latest:

npm install million@latest

Let's dig straight into it:

Virtualization

Last week, I released a sneak peek of Million.js virtualizing in React. This week, I'm happy to announce that virtualization is now available in Million.js via TanStack Virtual! You can check out the virtualizing guide here to get started.

Want to compare Million.js vs React virtualization? Check out this demo! (opens in a new tab)

Analytics

Million.js supports a new analytics option, where you can hook into the compiler and get insight into blocks. Here's a basic example of how you can use it:

const ComponentBlock = block(Component, {
  analytics: ({ traversals, data }) => {
    const percentImprovement = Math.round(
      ((traversals - data.traversals) / traversals) * 100,
    );
    console.log(
      `Million.js is reducing reconciliation by ${percentImprovement}%`,
    );
  },
});

More

You can view the full release here: https://github.com/aidenybai/million/releases/tag/v2.5.1 (opens in a new tab)