A JavaScript framework is a library or collection of tools that provides an opinionated way to build interactive web applications, usually through reusable components and automatic DOM updates when data changes. React, Vue and Angular are common examples.
Why it matters
Frameworks speed up development of complex interfaces and give teams shared conventions. The cost is payload and complexity: framework code, build tooling and hydration add download and execution time, and failures in a script can leave users with a blank screen. Choosing one is a trade-off, not a default.
Example
A tiny counter shows the idea. Instead of manually finding a node and rewriting its text, the component declares what should show for a given state and the framework updates the DOM:
function Counter() {
const [n, setN] = useState(0);
return <button onClick={() => setN(n + 1)}>Clicked {n}</button>;
}
Common mistakes
- Adopting a framework for a mostly static brochure site that plain HTML would serve faster.
- Ignoring bundle size until pages take seconds to become interactive.
- Mixing up library and framework: React is often called a library because it focuses on the view layer.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.