Upgrading Checkout Blocks app to Polaris web components
Shopify's Checkout Blocks team migrated five high-traffic checkout UI extensions from React and the legacy Remote UI bridge to Preact, remote-dom and Polaris web components, rewriting them in TypeScript, and cut transferred bundle sizes by 40-85% and extension load time by about 8% at P50. Most of the work went into fitting under the new 64KB gzip bundle limit. Dropping react-reconciler saved about 89KB, a custom AI-assisted Liquid parser validated against a 42,000-line production parity corpus replaced liquidjs, and markdown-to-jsx was kept by aliasing React to Preact. The team migrated one extension per day, smallest first, behind new success/failure metrics. That monitoring caught a useId() ID-collision bug, which was rolled back the same day, and the work also produced upstream Polaris component fixes.
Related posts
- How We Built Hydrogen: A React Framework for Building Custom Storefronts
Shopify Engineering mediumAdeptHydrogen, Shopify's React framework for custom storefronts, was built on React Server Components, React 18 streaming SSR and Vite, chosen over static JAMStack approaches because commerce pages are inherently dynamic. Component-level data fetching replaced route loaders, and a preload cache hoists nested queries so they run in parallel instead of in network waterfalls. Removing bloated exported GraphQL fragments and adding a logger for unused query fields cut some demo store route load times in half. Rigid "magical" context-based components were dropped in favor of leaner primitives, and the team describes its early reverse-engineered RSC implementation and collaboration with the React, Vite, Vercel and Cloudflare teams.
- Remixing Shopify's Admin: How We Made It 30% Faster and AI-Ready
Shopify Engineering mediumAdeptShopify migrated its Admin (67 million daily page views, 101 teams, ~350 PRs merged daily, 3M+ lines of TypeScript) to Remix in SPA mode with Vite. The result is a 30% improvement in perceived load times. Statically globbed, typed route manifests replaced a runtime getRoutes function and give Search and Sidekick a single source of truth for all 1,017 routes. Remix loaders remove the code-then-data waterfall by fetching a 3.2kb loader in parallel with a 914kb component bundle, and idle-time prefetching of loaders warms an Apollo cache persisted in IndexedDB. Adding Remix actions and zod schemas lets the Sidekick AI fill and submit forms without loading UI JavaScript.
- Why We Ripped Twin out of 400+ Components
Railway mediumAdeptRailway replaced twin.macro with vanilla Tailwind across 400+ React components, which removed the last dependency on Babel and let the monorepo move fully to SWC. Dev cold starts dropped from ~35s to ~1.5s, a full build from 220s to 42s, and CI from 4-6 to 2-4 minutes. The migration took ~30 PRs with a codemod and custom helpers. Nested selectors moved to Tailwind-processed CSS files, theme() calls became CSS variables, and Twin's inline-style precedence and automatic merging were handled by migrating pages first and core components last, using `!` overrides and tailwind-merge.
- Five years of React Native at Shopify
Shopify Engineering easyNoviceAfter five years, Shopify has migrated all its mobile apps to React Native, with each team choosing its own migration timing, and reports sub-500ms P75 screen loads, over 99.9% crash-free sessions, and an end to iOS/Android feature-parity work. Hot reloading and TypeScript let engineers move between web and mobile, but native developers and native code remain essential for hardware features, widgets, watch apps and long-running background sync such as Point of Sale offline data. The downsides are flaky debugging, labor-intensive framework upgrades (handled by a rotating group) and heavier reliance on third-party libraries, mitigated with Dependabot and code scanning. Shopify is now extracting shared libraries for identity, monitoring and performance measurement after initially trading consistency for migration speed.
- Improving site performance by shipping more CSS
GitHub Engineering mediumAdeptGitHub migrated its Primer Design System and the github.com codebase from styled-components CSS-in-JS to CSS Modules, removing runtime styling costs on client and server. Primer components moved first, each behind a feature flag and checked against visual regression snapshots, which cut server-side render time by 55% and component initialization by 25%. A wrapper package, @primer/styled-react, kept the legacy `sx` prop working during the transition. About 7,760 `sx` props were then migrated with a VS Code plugin, codemods and later Copilot coding agents, followed by decoupling theming, and dotcom reached 100% CSS Modules in June 2026 without breakage.