17
Web + frameworks / Intermediate

React, Vue, and Svelte overview

Component-driven frontend architecture, state, routing, forms, API calls, and how to decide whether a frontend framework is necessary.

reactvuesveltefrontendframework

01Do you need a framework?

Server-rendered HTML with small JavaScript modules is often simpler for content sites and traditional CRUD. A frontend framework becomes more valuable when the browser owns complex interactive state, many reusable components, client-side navigation, or real-time workflows.

02React example

jsxSmall pure component
function ProjectCard({ project }) {
  return (
    <article>
      <h2>{project.name}</h2>
      <p>{project.summary}</p>
    </article>
  );
}

03Framework-independent principles

  • Keep server state and local UI state conceptually separate.
  • Validate again on the server even when the browser validates forms.
  • Use stable component keys.
  • Cancel obsolete requests when rapid navigation/search can race.
  • Measure bundle size and runtime cost instead of adding dependencies automatically.