Why would you migrate from Angular to React, and what challenges have you faced?
Reasons: smaller bundle, larger ecosystem/hiring pool, simpler mental model (no DI, no decorators, no NgModules), faster iteration. Challenges: re-implementing two-way binding with controlled inputs, replacing RxJS with React Query/Zustand, migrating dependency injection patterns, rebuilding form validation, and the team learning JSX + the 'thinking in React' model.
This is a real-world migration question — interviewers want to hear tradeoffs, not framework bashing.
Why teams migrate
- Bundle size: Angular's framework runtime is larger; React + a few libs is leaner for content-heavy or marketing apps.
- Hiring: the React talent pool is meaningfully bigger.
- Ecosystem: React Query, TanStack Table, shadcn/ui, Next.js — the cutting edge tends to ship to React first.
- Mental model: no NgModules, no providers tree, no DI container. Just functions and props.
- Iteration speed: HMR with Vite is significantly snappier than Angular's compile-then-reload.
When it's the wrong move: large enterprise apps with deep Angular-specific tooling, teams that lean heavily on RxJS, or shops where the existing Angular code is fine and the migration cost dwarfs the benefit.
Challenges you'll hit
| Angular concept | React migration | |
|---|---|---|
Two-way binding ([(ngModel)]) | Controlled inputs: value + onChange | |
| Services + DI | Custom hooks, Context, or a store (Zustand/Redux) | |
| RxJS Observables | React Query / SWR for server state; signals/zustand for client | |
| NgModules | ES modules + component co-location | |
| Pipes (`{{ x | currency }}`) | Plain JS functions inside JSX |
Directives (*ngFor) | Array .map() | |
| Template syntax | JSX — strange at first, especially className, onClick casing | |
| FormBuilder | React Hook Form + Zod | |
| Guards/Resolvers | Loader patterns (Remix/Next) or wrapper components | |
| Change detection (Zone.js) | Re-rendering driven by state changes |
Strategy: incremental, not big-bang
- Single-spa or module federation: run Angular + React side-by-side, migrate page-by-page.
- Web Components: wrap React components for the Angular shell to consume during transition.
- Routing: pick one router as the source of truth; the other framework becomes a child app.
- Auth + design system first: shared cross-framework primitives.
Watch-outs
- Team learning curve: JSX, hooks rules, useEffect mental model, and 'no DI' all take time.
- Form parity: Angular's reactive forms are very capable. React Hook Form + Zod gets there but the patterns differ.
- RxJS replacements: most observables are over-engineered for what's really server state — React Query usually wins.
- Testing: switch from TestBed to React Testing Library — different philosophy (test behavior, not implementation).
Talking about it in an interview
Pitch as a tradeoff, not a religious war: 'We had X pain (bundle, hiring, ecosystem), measured Y benefit (smaller bundle, faster onboarding), and accepted Z cost (3-month migration, team retraining). Here's the rollout plan and how we de-risked it.'
Follow-up questions
- •How would you run Angular and React side-by-side during the migration?
- •What's your replacement for RxJS observables in React?
- •How do you handle dependency injection patterns in React?
Common mistakes
- •Big-bang rewrite — almost always overruns and ships regressions.
- •Trying to recreate Angular DI in React with deeply nested Context.
- •Porting RxJS pipelines 1:1 instead of asking 'is this really server state?'
Performance considerations
- •Running both frameworks during migration doubles JS payload — measure and accept that interim cost. Once a route is fully React, the bundle for that route drops significantly. Use route-level code splitting so the Angular bundle only loads on Angular routes.
Edge cases
- •Hybrid pages where Angular forms own state but React renders a widget — pick one owner for the field.
- •Routing collisions when both frameworks try to handle the same URL.
- •Different change-detection models lead to subtle 'why didn't it re-render' bugs across the boundary.
Real-world examples
- •Airbnb famously documented their incremental migration patterns. Many fintech and SaaS shops have published their Angular → React playbooks; common shape is module federation + page-by-page swap over 6–18 months.