DEV Community

Branden Thomas
Branden Thomas

Posted on • Originally published at toweringmedia.com

Why We Rebuilt Our Magento Checkout with React: Performance Results

Magento's default Luma checkout loads a heavy Knockout.js stack, dozens of RequireJS modules, and payment iframes that fight for the main thread. For merchants where checkout is the conversion bottleneck, shaving seconds off load and interaction time pays back faster than another homepage hero image.

We rebuilt checkout in React—React Checkout Pro—for Magento 2 and Hyvä stores that needed Shopify-like speed without leaving Adobe Commerce. Here is what we measured, what surprised us, and what we would do differently.

The problem: checkout is where Core Web Vitals go to die

Homepage optimizations are table stakes. Checkout is different:

  • More JavaScript. Payment methods, validators, shipping step observers, and third-party scripts stack on one route.
  • More layout shift. Address suggestions, shipping method lists, and tax updates re-render large DOM regions.
  • More input delay. Autocomplete plugins, reCAPTCHA, and BNPL widgets compete on keydown handlers.

On a representative Luma checkout (mid-size US retailer, ~80 SKUs in catalog, 4 payment methods), lab tests before migration showed:

Metric Luma checkout (before) React checkout (after)
LCP (lab, 4G) 4.8s 2.1s
INP (field interaction) 320ms 95ms
CLS (full flow) 0.18 0.04
JS transferred (checkout route) ~1.9 MB ~420 KB
Time to interactive (est.) 6.2s 2.8s

Field data from CrUX lagged lab wins by 4–6 weeks but trended the same direction once cache and CDN rules settled.

Your numbers will differ. The pattern we see repeatedly: the biggest win is shipping less JavaScript to checkout, not micro-optimizing the JavaScript you keep.

Architecture: React island, Magento brain

We did not headless the entire storefront. Magento still owns:

  • Quote totals and tax calculation
  • Shipping rate requests
  • Payment tokenization and order placement APIs
  • Customer session and cart persistence

React owns the UI layer: step navigation, form state, validation UX, and optimistic updates while Magento APIs catch up.

High-level flow:

Browser → React Checkout (Vite bundle)
       → Magento REST/GraphQL (guest-cart, estimate-shipping, payment-information)
       → Payment provider (Stripe, Moneris, etc.)
Enter fullscreen mode Exit fullscreen mode

Keeping business logic on the server avoided duplicating tax rules and promotion logic in the frontend—an easy way to lose trust with finance teams.

What we changed in the bundle

1. Replace Knockout with a single React tree

Luma checkout initializes many small view models. Each binds to DOM sections independently, which multiplies layout work. One React root with step-based code splitting let us load payment code only when the user reaches payment.

2. Tailwind + minimal CSS

Utility-first CSS reduced unused stylesheet bytes compared to Luma's LESS pipeline on checkout. Hyvä stores already think this way; React checkout aligned with their performance culture.

3. Defer non-critical scripts

GTM, heatmaps, and chat widgets load after requestIdleCallback or first interaction. Merchants hate delaying analytics; we show them INP improvements and they usually accept deferred tags on checkout only.

4. Address and shipping API batching

Instead of re-fetching totals on every field blur, we debounce shipping method refreshes (300ms) and batch validation calls. Fewer round trips means lower INP when users tab through address fields.

Hyvä compatibility mattered

Many of our clients run Hyvä Theme on catalog and CMS routes (often after a Hyvä migration with Towering Media) but still had Luma checkout via fallback. That hybrid meant users got fast browsing then hit a slow checkout—a conversion cliff.

Shipping a Hyvä-native React checkout removed the theme switch penalty and let us share design tokens (spacing, typography) with the rest of the storefront.

Before/after: what merchants actually noticed

Performance metrics are for developers. Merchants care about:

  • Mobile completion rate — one client saw mobile checkout completion up 11% over 90 days (multiple factors, but checkout deploy was the largest change)
  • Support tickets — "checkout stuck" and "shipping won't load" tickets dropped sharply
  • Payment retries — fewer double-charges from users hammering the Place Order button on slow responses

We always pair technical metrics with one business KPI in the project charter. Otherwise optimization work gets deprioritized after launch.

Tradeoffs we are honest about

More moving parts. React checkout is another build pipeline (Node, CI, staged deploys). Teams without frontend capacity should budget ongoing maintenance.

Extension compatibility. Third-party checkout modules written for Knockout do not drop in. Audit payment, gift message, and donation extensions before committing.

SEO is irrelevant here. Checkout should be noindex anyway. Optimize for INP and reliability, not rankings.

Not always worth it. If your store does low checkout volume or your Luma checkout is already heavily cached and simple, a full React rebuild may lose to smaller fixes (Varnish tuning, fewer payment methods, Hyvä Checkout if it fits).

When to choose React checkout vs Hyvä Checkout

Factor Hyvä Checkout React Checkout Pro
Team skills PHP/Tailwind/Alpine React/TypeScript
Custom step flows Good Excellent
Third-party payment UX Growing ecosystem Flexible BYO components
Bundle weight Very low Low (if built carefully)

We often recommend Hyvä Checkout for straightforward B2C flows and React when the merchant needs custom steps (B2B approvals, donation lines, delivery date slots).

How to measure your own candidate

Before you rewrite anything:

  1. Record baseline Web Vitals on /checkout with Chrome UX Report and Lighthouse (same device profile each time)
  2. Capture a WebPageTest filmstrip with authentication cookie
  3. Log Magento estimate-shipping-methods and totals-information API timings server-side

If server APIs account for more than half of wait time, fix backend and caching first. React cannot fix slow FedEx rate calls.

Summary

Rebuilding Magento checkout in React was not about chasing a framework trend. It was about reducing JavaScript execution and layout thrash on the highest-stakes page in the funnel. For stores already on Hyvä or planning a frontend modernization, the performance delta is measurable within weeks—and the conversion impact often follows.


About the author: Branden Thomas is cofounder of Towering Media, a Chicago Magento agency and Hyvä partner. Learn more about React Checkout Pro for Magento 2.

Top comments (0)