Swapping UI Component Libraries Without Stopping Feature Work
Get a summary of this article:
Most teams that need to swap their UI component library don’t fail because the new library is wrong. They fail because the swap is planned as a project: freeze features, migrate everything, release. Six months later the roadmap has slipped, half the screens are migrated, the product team is losing patience, and the project quietly stalls with two libraries in the codebase instead of one.
There’s a better way. Treat the swap as a steady stream of small, reversible changes that run alongside feature work, not instead of it. This guide is the playbook: how to budget capacity, put an adapter between your screens and any library, migrate behind feature flags, prove each migrated screen matches the old one, and track progress until the old library can be deleted.
The examples follow a common move: data-heavy screens going from MUI X Data Grid and AG Grid to Ext JS components in React through ReExt. The method works for any library swap.
Three principles
Every decision in this playbook follows from three principles:
- Incremental. Move one screen or one component at a time. Every step ships to production on its own, and the app works at every point along the way.
- Reversible. Each migrated screen can be switched back to the old library in minutes if something goes wrong, without a redeploy.
- Budgeted. Migration gets a fixed, visible share of team capacity every sprint, so it neither stalls nor crowds out features.
A swap that follows all three looks boring from the outside: a few screens move each sprint, features keep shipping, and one day the old library’s last import is deleted. That’s the goal.
Step 1: Budget capacity and choose the order
Set a capacity budget
Agree with product leadership on a fixed share of each sprint for migration, typically 10 to 20 percent of the team’s capacity. Make it visible on the board, like any other commitment. Two rules keep it honest:
- Migrate as you touch. Any screen that gets a feature change this sprint moves to the new library as part of that work, at no extra cost in planning.
- Protect the budget. If a deadline needs the capacity, borrow it explicitly and pay it back next sprint, rather than letting migration quietly stop.
Choose the order
Score each screen to decide what moves first:
| Factor | Move earlier if… |
|---|---|
| Pain | The screen has the most workarounds, bugs or performance complaints |
| Traffic | Many users depend on it daily, so improvements are visible |
| Change rate | It changes often, so it will be touched soon anyway |
| Risk | It’s low-risk to start, so the team can learn the new library safely |
A good sequence is: one low-risk screen to learn on, then the most painful high-traffic screens, then everything else as it’s touched. Leave stable, rarely used screens for last; some may never need to move until you retire the old library.
Also Read: https://www.sencha.com/blog/6-steps-enterprise-application-development-process-that-works/
Step 2: Put an adapter between your screens and the libraries
The single most useful thing you can do is stop screens from importing either library directly. Define a small component API your screens need, then implement it twice: once with the old library and once with the new one. Screens switch by changing which implementation they get, not by being rewritten.
The contract
// packages/ui/src/grid/contract.ts
export interface GridColumn {
field: string;
header: string;
type?: 'text' | 'number' | 'currency' | 'date';
width?: number;
editable?: boolean;
}
export interface DataGridProps<Row> {
columns: GridColumn[];
rows: Row[];
height?: number;
onRowOpen?: (row: Row) => void;
onCellEdit?: (row: Row, field: string, value: unknown) => Promise<void>;
}
The old implementation, wrapping MUI X
// packages/ui/src/grid/LegacyGrid.tsx
import { DataGrid as MuiDataGrid } from '@mui/x-data-grid';
import type { DataGridProps } from './contract';
export function LegacyGrid<Row extends { id: string | number }>(props: DataGridProps<Row>) {
const { columns, rows, height = 480, onRowOpen, onCellEdit } = props;
return (
<div style={{ height }}>
<MuiDataGrid
rows={rows}
columns={columns.map((c) => ({
field: c.field, headerName: c.header, width: c.width ?? 150, editable: c.editable,
type: c.type === 'currency' ? 'number' : c.type === 'date' ? 'date' : c.type === 'number' ? 'number' : 'string',
}))}
onRowDoubleClick={(params) => onRowOpen?.(params.row as Row)}
processRowUpdate={async (newRow, oldRow) => {
const field = Object.keys(newRow).find((k) => newRow[k] !== oldRow[k]);
if (field) await onCellEdit?.(newRow as Row, field, newRow[field]);
return newRow;
}}
/>
</div>
);
}
The new implementation, using ReExt
// packages/ui/src/grid/ReExtGrid.tsx
import ReExt from '@sencha/reext';
import type { DataGridProps, GridColumn } from './contract';
const toExtColumn = (c: GridColumn) => ({
text: c.header,
dataIndex: c.field,
width: c.width ?? 150,
...(c.type === 'currency' ? { xtype: 'numbercolumn', format: '$0,000.00', align: 'right' } : {}),
...(c.type === 'number' ? { xtype: 'numbercolumn', format: '0,000', align: 'right' } : {}),
...(c.type === 'date' ? { xtype: 'datecolumn', format: 'M j, Y' } : {}),
...(c.editable ? { editor: c.type === 'date' ? 'datefield' : c.type ? 'numberfield' : 'textfield' } : {}),
});
export function ReExtGrid<Row extends Record<string, unknown>>(props: DataGridProps<Row>) {
const { columns, rows, height = 480, onRowOpen, onCellEdit } = props;
return (
<ReExt
xtype="grid"
style={{ height }}
config={{
store: { data: rows },
plugins: [{ ptype: 'cellediting', clicksToEdit: 1 }],
columns: columns.map(toExtColumn),
}}
onRowdblclick={(view: unknown, record: any) => onRowOpen?.(record.getData())}
onEdit={async (editor: unknown, ctx: any) => {
try {
await onCellEdit?.(ctx.record.getData(), ctx.field, ctx.value);
ctx.record.commit();
} catch {
ctx.record.reject();
}
}}
/>
);
}
Both implementations honor the same contract, so screens can switch between them freely. Keep the contract small: add a prop only when a screen genuinely needs it, and only once both implementations support it. Production versions should memoize the configuration; the examples keep it inline for clarity.
Step 3: Migrate behind feature flags
The adapter makes switching possible; a feature flag makes it safe. The exported DataGrid picks the implementation per screen, based on a flag your feature-flag service controls:
// packages/ui/src/grid/DataGrid.tsx
import { LegacyGrid } from './LegacyGrid';
import { ReExtGrid } from './ReExtGrid';
import { useFlag } from '@acme/flags'; // your feature-flag client
import type { DataGridProps } from './contract';
export function DataGrid<Row extends { id: string | number }>(
props: DataGridProps<Row> & { screen: string },
) {
// e.g. flag "grid-reext:orders" turns on the new grid for the orders screen
const useNew = useFlag(`grid-reext:${props.screen}`);
return useNew ? <ReExtGrid {...props} /> : <LegacyGrid {...props} />;
}
Screens only ever import DataGrid:
<DataGrid
screen="orders"
columns={orderColumns}
rows={orders}
onRowOpen={(order) => navigate(`/orders/${order.id}`)}
onCellEdit={(order, field, value) => ordersApi.update(order.id, { [field]: value })}
/>
With that in place, each screen’s migration follows the same rollout:
- Internal first. Turn the flag on for the team and a few internal users.
- A small share of users. Expand to 5 or 10 percent and watch errors, performance and support tickets.
- Everyone. Turn it on for all users once the numbers look right.
- Clean up. After a stable period, remove the flag and the screen’s path to the old implementation.
If anything goes wrong at any stage, switch the flag off and users are back on the old grid within minutes, with no redeploy.
Two setup notes for ReExt: wrap the app, or the routes that use ReExt, in ReExtProvider before the first flag is turned on, and make sure the flag client resolves before the grid renders, so users don’t see one grid flash into the other.
Step 4: Prove parity before you flip the flag
“It looks the same” isn’t enough for a screen people use all day. Before widening a flag, check four kinds of parity, with the same tests run against both implementations:
| Parity | What to check | How |
|---|---|---|
| Behavior | Opening, editing, saving, sorting, filtering and error handling produce the same results | End-to-end tests run twice, once with each flag value |
| Data | Formatted values, totals and exports match | Compare rendered values and exported files on the same dataset |
| Performance | Load time and scrolling are as good or better | Measure with production-sized data on users’ typical hardware |
| Accessibility | Keyboard and screen reader behavior is as good or better | Run the same axe scans and keyboard checks on both |
Running the same Playwright test against both implementations is straightforward when the flag can be forced from the URL or a cookie in test environments:
// e2e/orders-parity.spec.ts
import { test, expect } from '@playwright/test';
for (const impl of ['legacy', 'reext']) {
test(`orders: open and edit an order (${impl})`, async ({ page }) => {
await page.goto(`/orders?flag.grid-reext:orders=${impl === 'reext'}`);
await expect(page.getByText('Acme Corp').first()).toBeVisible();
await page.getByText('Acme Corp').first().dblclick();
await expect(page).toHaveURL(/\/orders\/\d+/);
});
}
Parity doesn’t mean pixel-identical. The new grid may look slightly different, and that’s often an improvement. What must match is what users rely on: the data, the workflow and the keyboard behavior. Tell users about visible differences before the flag reaches them, so a changed look isn’t mistaken for a bug.
Step 5: Track progress and retire the old library
Migrations stall when nobody can see how far along they are. A small script run in CI gives everyone the same number every week, and lists exactly which files still depend on the old libraries:
// scripts/migration-progress.mjs: how many files still import the old libraries?
// Usage: node scripts/migration-progress.mjs src
import { readdirSync, readFileSync, statSync } from 'node:fs';
import { join } from 'node:path';
const OLD = [/^@mui\/x-data-grid/, /^ag-grid-/, /^recharts$/]; // libraries being replaced
const NEW = [/^@acme\/ui/]; // your wrapper package
function walk(dir, out = []) {
for (const name of readdirSync(dir)) {
if (name === 'node_modules' || name.startsWith('.')) continue;
const p = join(dir, name);
if (statSync(p).isDirectory()) walk(p, out);
else if (/\.(jsx?|tsx?)$/.test(name)) out.push(p);
}
return out;
}
const importRe = /from\s+['"]([^'"]+)['"]/g;
let oldFiles = [], newFiles = [];
for (const file of walk(process.argv[2] || 'src')) {
const specs = [...readFileSync(file, 'utf8').matchAll(importRe)].map((m) => m[1]);
if (specs.some((s) => OLD.some((r) => r.test(s)))) oldFiles.push(file);
if (specs.some((s) => NEW.some((r) => r.test(s)))) newFiles.push(file);
}
const total = new Set([...oldFiles, ...newFiles]).size;
const done = newFiles.filter((f) => !oldFiles.includes(f)).length;
console.log(`Migrated: ${done}/${total} files (${total ? Math.round((done / total) * 100) : 100}%)`);
oldFiles.forEach((f) => console.log(` still on old libraries: ${f}`));
Its output gives a clear status for the team’s weekly update:
Migrated: 2/4 files (50%)
still on old libraries: src/screens/Orders.tsx
still on old libraries: src/screens/Reports.tsx
Run it from the application folder, excluding the wrapper package itself, since that package intentionally imports both libraries during the migration. A file that imports both old and new counts as not yet done.
Retiring the old library
When the count reaches 100 percent and every flag has been on for all users for a stable period:
- Remove the flags and the LegacyGrid implementation.
- Uninstall the old packages and remove their CSS and theme overrides.
- Add the old packages to a lint rule or dependency policy so they can’t return.
- Cancel or reduce the old library’s licenses, and record the savings.
- Celebrate: you swapped a library and shipped features the whole time.
Example plan: MUI X and AG Grid to ReExt over three quarters
Here’s how the playbook might look for a team of eight developers with about 40 data-heavy screens, moving from MUI X Data Grid and AG Grid to ReExt, with 15 percent of capacity set aside for migration. The figures are illustrative; adjust them to your app.
| Quarter | Migration work | Feature work |
|---|---|---|
| Q1 | Build the contract and both implementations; add ReExtProvider; migrate one low-risk screen as a pilot; set up parity tests and the progress script; migrate the three most painful high-traffic screens | Roadmap continues at about 85 percent of capacity |
| Q2 | Migrate screens as they’re touched for features, plus the next most-used screens; widen flags to all users screen by screen; remove flags from screens that have been stable for a month | Roadmap continues; features on migrated screens use ReExt capabilities such as grouping and locked columns |
| Q3 | Migrate the remaining low-traffic screens; remove the legacy implementation and old packages; add the dependency policy; review licenses | Roadmap continues; the team now builds every new data screen on one library |
By the end, the team has shipped three quarters of features, the app has one grid library instead of two, and no screen went through a risky big-bang cutover.
Teams moving an existing Ext JS application into React can follow the same pattern: the “legacy” implementation renders the app’s existing Ext JS classes through ReExt by xtype, and screens move to new, React-wrapped components behind the same contract.
Frequently asked questions
How do I replace a UI component library without stopping feature work?
Set aside a fixed share of each sprint for migration, put an adapter between screens and the libraries, migrate one screen at a time behind feature flags, prove parity with tests run against both versions, and track progress until the old library can be removed.
How much capacity should a library migration take?
Typically 10 to 20 percent of a team’s capacity, plus migrating any screen that’s already being changed for a feature. That keeps the migration moving without stalling the roadmap.
Why use an adapter when swapping component libraries?
An adapter gives screens one stable API, implemented once with the old library and once with the new. Screens switch by changing implementation rather than being rewritten, and the next swap, if there ever is one, is just as easy.
How do feature flags help a component library migration?
They let you turn the new component on for a few users first, widen the rollout gradually, and switch back in minutes if something goes wrong, without a redeploy.
Can I migrate from MUI X or AG Grid to ReExt gradually?
Yes. Both can run in the same React app as ReExt during the migration. Wrap them behind one grid contract, and move screens to the ReExt implementation one at a time behind flags.
Swap the library, keep the roadmap
Swapping a UI component library doesn’t have to be a feature freeze. With a fixed capacity budget, an adapter between screens and libraries, feature flags for safe rollout, parity tests and a visible progress number, the swap becomes routine work that happens alongside everything else.
If your data-heavy screens are moving to ReExt, this playbook lets you do it screen by screen, while users keep getting new features.
Next steps: start a 30-day ReExt trial, read Why Data-Heavy Apps Outgrow General-Purpose UI Component Libraries, or see How to Standardize on One UI Component Library Across Your React Apps.
When a UI component library has an accessibility gap, it isn’t one bug on one…
Most React apps start with a general-purpose UI component library, and for good reason. Libraries…
Trading screens, logistics consoles, IoT monitors and operations dashboards all share one problem: the data…





