Back
Web Fundamentals

Framework Reactivity: React, Vue, Svelte & Solid

Web Fundamentals
Build & Deployment: Monorepo, CI/CD, Strategies & Release SafetyState Management: Choosing the Right SolutionRedux: Predictable State Container (RTK + RTK Query)React Query (TanStack Query): Server State CachingData Fetching Patterns: REST, GraphQL, tRPC & Real-timeGraphQL Fundamentals for Frontend: Shape, Caching, and TradeoffsgRPC-Web Fundamentals: Browser Constraints and Proxy ModelCaching Strategies: Client, Server & EdgeData Normalization: Organizing State for PerformanceAPI Design Best Practices: Pagination, Errors, Versioning & Type SafetyAPI Versioning Strategies for Frontend CompatibilityPagination: Offset vs Cursor-BasedRate Limiting & API Resilience: Retries, Backoff, Jitter, IdempotencyHow Frontend Developers Can Handle Millions of API Requests Without Crashing EverythingBrowser Storage: Cookies, SessionStorage, LocalStorage, IndexedDBReal-time Communication: WebSockets, SSE & PollingWebRTC: Real-Time Communication in the BrowserCore Web Vitals: LCP, INP & CLSPerformance Optimization Trade-offsCritical Resource Prioritization: Optimize Loading OrderCode Splitting: Optimize Bundle Size with Dynamic ImportsTree Shaking: Eliminate Dead Code from Your BundleLazy Loading: Load Resources On-DemandResource Hints: Preload, Prefetch & PreconnectText Compression: Gzip and BrotliImage & Video Optimization: Modern Formats & TechniquesAdaptive Loading: Optimize for Device & NetworkList Virtualization: Render Large Lists EfficientlyWeb Workers vs Main Thread: Offloading Heavy WorkMemory Leaks in Frontend Apps: Detection & PreventionManaging Third-Party Scripts: Optimization StrategiesHow CDNs Work: Edge Delivery, Caching & PerformanceHTTP Caching Deep Dive: Cache-Control, ETag & RevalidationService Workers & Offline Strategy: Cache First, Network First & Update LifecyclePWA Fundamentals: Manifest, Installability & Offline UXCritical Rendering PathScript Loading: async vs deferEvent Loop: Understanding JavaScript Execution ModelJavaScript Module Systems: CJS vs ESM vs UMDDynamic Module Loading: import() FunctionImport on Interaction: Load When User InteractsImport on Visibility: Lazy Loading with IntersectionObserverBrowser Rendering Pipeline & Layout ThrashingRendering Strategies: CSR vs SSR vs SSG vs ISRStreaming SSR: Progressive HTML StreamingIslands Architecture: Independent Component HydrationReact Server Components: Zero-JS Server RenderingFramework Reactivity: React, Vue, Svelte & SolidHTTP/1.1 vs HTTP/2 vs HTTP/3 (QUIC) for Frontend PerformanceDNS Resolution: Path, TTL, Caching & Frontend ImpactCross-Site Scripting (XSS) AttacksCross-Site Request Forgery (CSRF) AttacksCORS Explained: Cross-Origin Resource SharingCORS Preflight in Practice: Credentials, Simple Requests & MisconfigurationsContent Security Policy (CSP)Why is HTTPS Secure? Understanding TLS/SSLAuthorization Best PracticesCookie Security & Session Hardening: SameSite, HttpOnly, Secure
mediumRendering & Browser Architecture

Framework Reactivity: React, Vue, Svelte & Solid

TL;DRReact: re-render + diff • Vue: proxy tracking • Svelte: compile-time • Solid: fine-grained signals
High Signal
Google
Meta
Netflix
Agoda
30-Second Answerstart every interview with this

Every framework solves the same problem — efficiently updating the DOM when state changes — but they differ in where dependency tracking happens, how updates are scheduled, and how much work reaches the browser. Understanding these mechanics helps you write better code and make informed framework decisions.

State change = event. Frameworks differ in how they detect the event, who gets notified, and how much work is done to update the UI. React re-runs whole components. Vue tracks exact dependencies. Svelte generates precise update code at build time. Solid uses explicit fine-grained signals.

State Change
Dependency Detection
Update Scheduling
Minimal DOM Commit
Browser Rendering Pipeline

1React Reactivity

Re-renders components on state change, then reconciles the virtual DOM. Updates are batched and prioritized by the scheduler. Coarse-grained by default — optimization comes from memoization, keys, and boundaries.

Counter.jsxjsx
const [count, setCount] = useState(0);

return <button onClick={() => setCount(c => c + 1)}>{count}</button>;

2Vue Reactivity

Uses Proxy-based tracking. Reads during render create fine-grained dependencies. Only affected effects/computeds re-run. Strong DX but requires care with refs and destructuring.

3Svelte & Solid

Svelte moves reactivity to compile time — assignments trigger targeted DOM updates. Solid uses explicit signals for precise runtime updates without component re-renders.

PropertyReactVueSvelteSolid
StrengthPredictable, mature ecosystemExcellent DX + automatic trackingMinimal runtime overheadNo virtual DOM, pure reactivity
TrackingRe-render + diff (virtual DOM)Proxy + dependency graphCompile-time (compiler emits code)Explicit signals + reactive graph
GranularityComponent-levelFine-grained (property level)Very fine-grainedExtremely fine-grained
Runtime CostHigher (reconciliation)MediumVery lowVery low

React

Strength

Predictable, mature ecosystem

Tracking

Re-render + diff (virtual DOM)

Granularity

Component-level

Runtime Cost

Higher (reconciliation)

Vue

Strength

Excellent DX + automatic tracking

Tracking

Proxy + dependency graph

Granularity

Fine-grained (property level)

Runtime Cost

Medium

Svelte

Strength

Minimal runtime overhead

Tracking

Compile-time (compiler emits code)

Granularity

Very fine-grained

Runtime Cost

Very low

Solid

Strength

No virtual DOM, pure reactivity

Tracking

Explicit signals + reactive graph

Granularity

Extremely fine-grained

Runtime Cost

Very low

Common questions

  • ›“How does reactivity work in React vs Vue?”
  • ›“Why is Svelte/Solid often faster than React?”
  • ›“What are the trade-offs of fine-grained vs coarse-grained reactivity?”
  • ›“How would you optimize a slow React component?”

What interviewers look for

  • Mechanics over syntax (tracking, scheduling, commit)
  • Understanding of re-renders vs fine-grained updates
  • Awareness of real costs (bundle size, hydration, browser pipeline)
  • Architecture thinking (boundaries, state placement)

Short answer (60 sec)

React re-renders components and diffs the tree. Vue tracks dependencies with proxies for fine-grained updates. Svelte compiles reactivity away at build time. Solid uses explicit signals for precise runtime updates. The key is minimizing unnecessary work reaching the DOM.

Detailed answer (senior level)

All frameworks solve dependency tracking + scheduling + DOM commit. React uses a render + reconciliation model. Vue builds a reactive dependency graph. Svelte shifts work to the compiler. Solid keeps fine-grained reactivity at runtime without VDOM. Senior answers connect these to real performance: bundle size, hydration, layout thrashing, and scheduling under frame budgets.

  • Thinking re-renders are always expensive in React
  • Losing reactivity in Vue by destructuring reactive objects
  • Over-relying on framework defaults without understanding boundaries
  • Ignoring browser costs (layout/paint) and blaming only the framework
  • Creating unnecessary shared state that triggers wide updates
Key Takeaways
  • ✓Reactivity = dependency tracking + scheduling + minimal DOM updates
  • ✓React: re-render + diff (coarse but predictable)
  • ✓Vue: proxy-based fine-grained tracking
  • ✓Svelte: compile-time reactivity (minimal runtime)
  • ✓Solid: explicit signals for precise updates
  • ✓State placement and component boundaries matter more than framework choice
  • ✓Always measure real user metrics — not just framework benchmarks
Previous TopicReact Server Components: Zero-JS Server RenderingNext Topic HTTP/1.1 vs HTTP/2 vs HTTP/3 (QUIC) for Frontend Performance

On this page