Appearance

Visual style

Mode
Theme
Accent
Advanced
Text sizeScales the whole site
16 px
Reduce motionReduce animations or match your system
Separate light and darkChoose a theme, accent and font for each
50

Technology · Frontend

React development

React is a JavaScript library for building user interfaces from components, maintained by Meta and the open-source community. Its documentation describes components as functions that return markup, with state and effects managed through hooks; React 19 also supports Server Components and Actions.

In practice

How I use React

React is in nearly every product I build, usually through Next.js. I also use it as a small island inside static Astro sites (this portfolio's project browser and skills tabs are React islands), and on its own with Vite for motion-heavy sites such as the Litgrxpher photography portfolio.

Component and container separation

The rule I follow in every React codebase: presentational components don’t fetch data, and data components don’t own markup.

  • Presentational components take props and render. They are easy to test, reuse and review visually.
  • Containers (or, in the App Router, Server Components and hooks) fetch, transform and pass data down.

This keeps a seller dashboard’s order table, for example, reusable whether its rows come from a GraphQL query, a REST endpoint or a test fixture.

React islands in static sites

On static sites, I hydrate React only for components that need it. On this portfolio, the project browser and the skills tabs are React islands; everything else is server-rendered HTML with no client framework at all. The page stays fast, and the interactive parts still get React’s component model.

State boundaries I keep consistent

Kind of stateWhere it lives
Server data (orders, products, users)TanStack Query cache or Server Components
Cross-cutting UI state (session, cart, filters shared across pages)Redux Toolkit or Zustand, kept small
Local UI state (open menu, input value)useState in the component that owns it
URL state (search, pagination, selected tab)The URL, so it’s shareable and crawlable

Illustrative example: a container and a view

// Container: knows where data comes from
export function OrdersPanel() {
  const { data, isPending, error } = useOrders({ status: "open" });
  if (error) return <ErrorState retry />;
  return <OrdersTable rows={data ?? []} loading={isPending} />;
}

// View: pure props in, markup out
export function OrdersTable({ rows, loading }: { rows: Order[]; loading: boolean }) {
  /* ...table markup only... */
}

Trade-offs

Where React shines, and where it doesn't

Strengths

  • Component model scales from one widget to multi-app design systems.
  • Huge ecosystem of accessible primitives (Radix UI, React Aria) and form, state and data libraries.
  • Can be used as a full app framework through Next.js or as small islands inside static pages.

Limitations

  • Shipping React to the browser has a JavaScript cost; static content shouldn't need it.
  • Effects are easy to misuse. Data-fetching in useEffect without a cache layer causes waterfalls and race conditions.
  • Choosing state management is left to you, which leads to inconsistent codebases without conventions.

Sources

Official documentation

General descriptions on this page are based on the official documentation linked below. Experience notes are my own.

FAQ

React questions

What is the difference between React and Next.js?

React is the UI library: components, state and rendering. Next.js is a framework built on React that adds routing, server rendering, data fetching conventions, metadata and build tooling. You can use React without Next.js, but most production web apps need what a framework provides.

Should a marketing website be built in React?

Only the interactive parts need to be. I usually build marketing sites in Astro and add React islands for interactive components, so most of the page ships as plain HTML and CSS.

What is component and container separation in React?

It's splitting components into two kinds: presentational components that receive props and render markup, and containers (or hooks and Server Components) that fetch and shape data. Presentational components become reusable and easy to test, and data sources can change without touching the UI.

Need a React developer?

If your project needs React, send a short description of what you're building and where it's stuck. I'll reply with how I'd approach it.