Skip to main content

React

React is a JavaScript library for building user interfaces, developed and maintained by Meta (Facebook). It's the most popular frontend library, powering countless web applications from startups to Fortune 500 companies.

Core Concepts

  • Components: Reusable, composable building blocks
  • JSX: JavaScript syntax extension for writing UI
  • Virtual DOM: Efficient updates through diffing
  • Hooks: Functions for state and lifecycle in function components
  • Unidirectional data flow: Props down, events up

Essential Hooks

// State management
const [count, setCount] = useState(0);

// Side effects
useEffect(() => {
document.title = `Count: ${count}`;
}, [count]);

// Context consumption
const theme = useContext(ThemeContext);

// Memoization
const expensiveValue = useMemo(() => compute(data), [data]);

Ecosystem

React is a library, not a framework. You'll need additional tools:

NeedCommon Solutions
RoutingReact Router, TanStack Router
StateRedux, Zustand, Jotai, Context
Data fetchingTanStack Query, SWR
FormsReact Hook Form, Formik
StylingTailwind, styled-components, CSS Modules
Meta-frameworkNext.js, Remix

What We Like

  • Ecosystem: Largest library ecosystem of any framework
  • Performance: Virtual DOM and concurrent features
  • React Native: Share code with mobile apps
  • Job market: Most in-demand frontend skill
  • Flexibility: Choose your own tools and patterns

What We Don't Like

  • JSX opinions: Some developers prefer templates
  • Fast-moving: Best practices change frequently
  • Boilerplate: State management can get verbose
  • Decision fatigue: Many choices for common problems

When to Choose React

  • Most web application projects
  • Teams with JavaScript/TypeScript expertise
  • Need for extensive third-party integrations
  • Cross-platform ambitions (React Native)
  • Projects requiring maximum flexibility

Getting Started

For new projects, we suggest starting with a minimal React boilerplate rather than a full meta-framework like Next.js, which is often overkill. This makes it easy to deploy to AWS Amplify or a simple S3/CloudFront hosting setup.