INITIALIZING…
0%
Performance
•Sep 12, 2026•6 min read

Simple ways to improve perceived performance in React apps

Why instant visual feedback, optimistic updates, and strategic transition states beat milliseconds of raw server latency every single time.

Hamza Tariq

Hamza Tariq

Core Systems Engineer at Ziilink AI

Simple ways to improve perceived performance in React apps

The Psychology of Waiting

User perception of speed is largely psychological. A system that acknowledges user intent within 16 milliseconds (1 frame) feels instantaneous, even if the underlying mutation takes 400ms to persist to the database.

Conversely, an application that waits for full server confirmation before modifying the DOM feels unresponsive and broken.

Optimistic State Updates in Practice

In modern React applications, optimistic UI updates allow us to paint user actions immediately while safely rolling back state in the rare event of a server error.

TSXZiilink Studio Spec
import { useOptimistic, useTransition } from "react";

export function BookmarkToggle({ id, isSaved, onToggle }: Props) {
  const [isPending, startTransition] = useTransition();
  const [optimisticSaved, setOptimisticSaved] = useOptimistic(
    isSaved,
    (_current, nextState: boolean) => nextState
  );

  return (
    <button
      onClick={() => {
        startTransition(async () => {
          setOptimisticSaved(!optimisticSaved);
          await onToggle(id, !optimisticSaved);
        });
      }}
      className={optimisticSaved ? "text-primary" : "text-muted"}
    >
      {optimisticSaved ? "Saved" : "Save"}
    </button>
  );
}
Using React's useOptimistic hook for instantaneous bookmark toggling

Selective Hydration and Critical CSS

By streaming server components and deferring non-critical interactive widgets (such as floating chat assistants or heavy telemetry graphs) until after the primary content paints, First Contentful Paint drops dramatically.

Tags:#Performance#React#Next.js#UX Engineering

Enjoyed this article?

Help other engineers discover it with a like or share.

Community Discussion

Comments (0)

No login required
Markdown code formatting supported

Continue Reading

Related Articles

All articles →