Urgent.News

What's breaking now, across thousands of outlets.

Tech

From 1,256ms to 96ms: Fixing INP in a Massive React Dropdown

The Scenario In Subito's design system, we rely heavily on a custom MultiSelect component. We use it across our marketplace as a standard checkbox-style filter: you search, tick a few boxes, and hit Apply. Under the hood, it's built on top of react-select , completely re-skinned. For most filters (like item condition or shipping), the option list has about a dozen entries. It felt instant because…

The Subito design system utilizes a custom MultiSelect component, built upon react-select, to function as a standard checkbox-style filter for its marketplace. This filter displays a catalog of around 1,175 options on the Marca (Brand) filter page, which negatively impacts performance on mobile devices with throttled CPUs, resulting in a poor Interaction to Next Paint (INP) metric of 1,256ms.

The primary issue lies within the synchronous block of work triggered by opening the dropdown, which forces React to create ~1,175 Option component instances, generating several DOM nodes. To solve this problem, the team adopted a virtualization technique, rendering only the items currently visible on the screen, plus a small buffer just outside the viewport. This approach avoids the need to create React components and DOM nodes for items that the user cannot currently see.

The team implemented a custom useVirtualScroll hook to track the scroll position and render only the visible rows, plus a small buffer (OVERSCAN of 5 items). Once the height of one row is measured after mounting, the hook calculates the total height of the list, as well as the slice of the list to render based on the current scroll position and viewport height. Only the ~13 necessary rows are mounted in the DOM, with the full list still available for scrolling and searching.

The key requirement for this approach is that every row must be the same height. If this condition is not met, the list will break and display gaps, overlapping rows, or unreachable options. The solution was successfully implemented using standard React APIs and does not require rewriting everything or importing large third-party virtualization libraries.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Unix Timestamp Explained: What Epoch Time Is and How to Convert It

If you've worked with APIs, databases, logs, authentication systems or backend applications, you've probably encountered a Unix timestamp.

  • Unix timestamps represent specific moments in time as numeric values since the Unix epoch.
  • Developers use Unix timestamps in APIs, databases, logs, and authentication systems.

When the Leased Laptops Went Back, the Data Went With Them

Three hundred and forty laptops came off a three year lease last spring. A logistics firm collected them over four days, signed a manifest, and returned them to the lessor.

  • 340 leased laptops lacked proper data sanitization
  • 28 devices never returned, posing security risk
  • Company updated procedures for in-house data sanitization

Every Release Note Is a Lesson Somebody Paid For

There is a free, expertly written, continuously updated course on almost every tool you use, and hardly anyone opens it. It is the release notes. Think about what goes into one.

  • Release notes contain concise descriptions of changes and deprecations.
  • Review release notes monthly for essential tools like language runtime.
  • Reading upgrade guides explains previous design flaws and prepares for changes.

Per-seat, flat-rate, or self-hosted: what a 3-, 8-, and 15-agent support team actually pays with Crisp, Help Scout, and Chatwoot

The problem with comparing support-tool pricing isn't arithmetic — it's architecture. Crisp charges a flat fee per workspace regardless of team size. Help Scout charges per seat.

  • Crisp charges a flat fee per workspace, irrespective of team size
  • Help Scout charges per seat, leading to higher costs as team grows
  • Chatwoot offers cloud (per-agent) and self-hosted (infrastructure-only) pricing models

Leak: EU Commission to pitch social media restrictions for under-15s

The European Commission will propose barring under-15s from social media without parental consent, plus safety-by-design rules for risky online services like AI chatbots and video games in a…

  • EU Commission plans to propose EU Kids Act restricting under-15s access to social media.
  • Parental approval required for minors under 15 to create social media accounts.
  • Tech companies to make digital services safe by design under new safety rules.

More from Tuesday 15 September →