Skip to main content

12 posts tagged with "frontend"

View All Tags

Frontend Performance Metrics That Matter: Core Web Vitals (LCP, INP, CLS)

· 7 min read
Pere Pages
Software Engineer
Three speedometer gauges above a browser window and a small speed meter, in indigo and teal

For anything users load in a browser, "how fast is it?" is really three questions — loading, interactivity, and visual stability — and the frontend has its own metric stack for each, plus the accessibility and client-side reliability signals that live right next to performance. Here's the set a frontend team actually owns, in one place.

A Senior Frontend Watchlist: Seven Talks on Rendering, Performance and Agent-Era Engineering

· 16 min read
Pere Pages
Software Engineer
Seven glowing browser windows on a dark indigo background arranged in three rows: a spiral waveform and a dotted timeline on top, two computers joined by a lime cross and a small tree diagram in the middle, and stacked layers, a flask with a green check mark and a robotic hand holding a pen at the bottom

Seven talks and essays, none of them a framework tutorial, that together cover what a senior frontend engineer is actually paid to understand: how a page gets to the user, where the client/server boundary sits, how a codebase stays maintainable, and how engineering practice changes when an agent writes most of the code. Each one is worth an evening; this post says why, and in which order.

Design Tokens in CSS: The 20% That Carries the Whole Design System

· 41 min read
Pere Pages
Software Engineer
A tall shelving unit seen head-on. The bottom shelf holds a small number of large, labelled jars of pigment, each with one clear tag. The shelves above hold many smaller unlabelled bottles, and thin threads run from each small bottle down to one of the big labelled jars it was poured from.

I am building a design system, and the part I keep coming back to is not the components. It is the hundred or so named decisions underneath them. Design tokens are the twenty percent of a design system that decides whether the other eighty holds together, and the part of them you actually have to understand fits in one careful read.

Inside the Cookie Jar, How Chrome Actually Handles Cookies (and Why It Matters for Developers)

· 12 min read
Pere Pages
Software Engineer

Cookies are tiny key–value blobs with rules. Chrome enforces those rules rigorously: where the cookie applies (domain/path), when it’s sent (request matching + SameSite), how it’s protected (Secure/HttpOnly), and how long it survives (expiry/eviction). This post walks through the full lifecycle, browser behavior, sharp edges, and production patterns—with TypeScript examples.

  • Use server-set, Secure; HttpOnly; SameSite=Lax cookies for auth.
  • Scope deliberately with domain and path; avoid accidental overlaps.
  • Understand SameSite (and partitioning) for cross-site flows.
  • Keep cookies small, few, and purposeful.

A Complete Guide to the Compound Component Pattern in React (With TypeScript Examples)

· 7 min read
Pere Pages
Software Engineer
Nested modular blocks snapping together around a shared glowing state core

The Compound Component Pattern has become a popular approach in React for building flexible, reusable components. You'll often see it in two flavors: separate exports (<SelectTrigger />) or dot notation (<Select.Trigger />). But like any pattern, it comes with significant trade-offs. Let's explore both sides.

Vite

· 8 min read
Pere Pages
Software Engineer
Vite logo

Vite, Next Generation Frontend Tooling

The Vite project is a modern, fast front-end build tool that significantly improves the development experience for web projects. Created by Evan You, the creator of Vue.js, Vite leverages modern web standards such as native ES modules (ESM) to enable lightning-fast server start-up and hot module replacement (HMR). Here's a quick rundown of its core features and philosophies:

  • Instant Server Start: By using native ESM, Vite starts its server in milliseconds, allowing developers to begin working on their project almost immediately after running the start command.
  • Hot Module Replacement (HMR): Vite provides out-of-the-box support for HMR, which means changes you make in your code can be reflected in the browser without needing a full page reload.
  • Optimized Build: For production builds, Vite uses Rollup under the hood. This combination allows for highly optimized output that's both efficient and scalable.
  • Rich Plugin Ecosystem: Vite supports a wide range of plugins, enabling integration with various frameworks (Vue, React, Svelte, etc.) and tools (TypeScript, PostCSS, etc.), enhancing its versatility.
  • Built-in Features: It comes packed with features like TypeScript support, CSS pre-processing, and more, all configured to work out-of-the-box.