81 Introduction to Frontend Integration (React, Vue, Svelte)
IH
Ihsan Arif
Writer at Santekno · Backend Engineer
81 Introduction to Frontend Integration: React, Vue, and Svelte
By: An engineer who loves trying out new frameworks
Frontend development has evolved at a breakneck pace over the past decade. While our hero used to be jQuery, today there are hundreds of frameworks offering all sorts of approaches to building UIs reactively and efficiently. Among the most popular are React, Vue, and Svelte. For an engineer, however, simply being able to “use” them isn’t enough—understanding how to integrate them, comparing their architectures, and grasping their agility and simplicity is an art in itself.
In this article, I’ll cover an introduction to integrating these three modern frameworks; we’ll explore their philosophies, how they work, code examples, integration simulations, and compare their strengths and weaknesses. I’ll also throw in some flow diagrams using Mermaid syntax.
Why Do We Need a Modern Framework?
Before we get into the technical details, we need to understand the reasoning first. Today’s websites demand to be interactive, component-based, and capable of real-time updates without reloading. Vanilla JS or jQuery quickly becomes a hassle when you have to manage lots of state and chained DOM manipulation. The solution: declarative UI.
The three frameworks we’ll discuss are all production-proven and used at enterprise scale:
Framework
Developer
Release Year
GitHub Popularity (2024)
React
Facebook/Meta
2013
215k+ Stars
Vue
Evan You + community
2014
207k+ Stars
Svelte
Rich Harris
2016
78k+ Stars
Core Philosophy: React, Vue, Svelte
React: “Just JavaScript”. Built around the virtual DOM and a declarative approach. It treats the UI as a function of state.
Vue: A progressive framework. Highly flexible, with a template syntax familiar to anyone who knows HTML.
Svelte: A compiler, not a runtime framework. It eliminates the virtual DOM, generating extremely lightweight and performant JS code.
Concept Diagram
MERMAID
graph LR
State -->|Trigger| UI[Update UI]
UI ---> UserInput[User Action]
UserInput --> State
note right of State: Proses ini terjadi di semua framework modern (React, Vue, Svelte)
graph LR
State -->|Trigger| UI[Update UI]
UI ---> UserInput[User Action]
UserInput --> State
note right of State: Proses ini terjadi di<br>semua framework modern<br>(React, Vue, Svelte)
Now imagine a legacy app that already uses React, and you want to add a new module built with Vue or Svelte. Can a single page mix different frameworks? The answer: it’s a bit of a hassle, but possible via micro-frontends (using iframes, Custom Elements, or Webpack module federation).
Multi-Framework Integration Flow Diagram:
MERMAID
flowchart TD
A[Parent App (React)] -->|Expose| B[Micro frontend: Vue component]
A -->|Expose| C[Micro frontend: Svelte component]
B & C --> D(User Interaction)
D -->|Propagate| A
note right of D: Semuanya bisa saling komunikasi via Custom Event, API Bridge, dsb
flowchart TD
A[Parent App (React)] -->|Expose| B[Micro frontend: Vue component]
A -->|Expose| C[Micro frontend: Svelte component]
B & C --> D(User Interaction)
D -->|Propagate| A
note right of D: Semuanya bisa saling komunikasi via<br>Custom Event, API Bridge, dsb
Comparing Integration and Learning Curve
Aspect
React
Vue
Svelte
Documentation
Comprehensive
Easy & Complete
Simple
Community
Very large
Large
Growing rapidly
Integration into Legacy
Very easy
Easy
Very easy
State Management
Needs Redux/Context
Vuex/Pinia
Built-in store
Learning Curve
Moderate
Easy
Easiest
Compilation Output
Large, runtime
Small-Medium, runtime
Small, no runtime
React is highly modular, easy to graft onto a legacy codebase (for example, calling ReactDOM.render anywhere).
Vue is also easy to embed thanks to its HTML-like API.
Svelte can even be compiled into a Custom Element (web component) and embedded into any page.
A Simple Integration Case Study (React + Svelte with Web Components)
If your main app is React, but you want to use a Svelte component for a new feature (say, a star rating):
A JS file appears (for example, StarRating.js), then in React:
jsx
1import"./StarRating.js";// result of the Svelte compilation
2 3functionFeedback(){ 4return( 5<div> 6<h2>GiveaRating:</h2> 7<star-ratingvalue={3}></star-rating> 8</div> 9);10}
Voilà. React and Svelte components live in harmony on a single page.
Conclusion & Engineer’s Advice
React is very mature and a great fit for large/modular applications.
Vue is a solid choice for those who want tidy conventions and a short learning curve.
Svelte excels in code production speed, performance, and integration (compiling down to a web component).
Choose according to your business needs and your team’s skills. All of them can be integrated into legacy systems, and even mixed together. The key: understand the entry point, mounting, and composability.
Learn one, but don’t be afraid to explore the others. Because in the end, an engineer is judged not by the tools they pick, but by the solutions they deliver.
Don’t forget, a framework is just a tool. Understanding the principles of state, composition, and inter-component communication is clearly more important. Happy experimenting!
This post is part of the “81 Days of Modern Frontend” series—don’t forget to share & follow for more insights to come!