gitwtfhub

wtf is hooks-perf-issues?

gaearon/hooks-perf-issues — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2019-03-03

13JavaScriptAudience · developerComplexity · 2/5DormantSetup · easy

TL;DR

A teaching demo showing how React hooks can make UI updates 4-5x slower than class components if callback functions aren't handled carefully.

Mindmap

mindmap
  root((repo))
    What it does
      Hooks vs classes demo
      Shows perf pitfall
      Educational only
    Tech stack
      JavaScript
      React
      React.memo
    Use cases
      Learn why app feels slow
      Understand callback identity
      Fix unnecessary re-renders
    Audience
      React developers
      Performance learners
    Cause
      New callback each render
      Memoized children re-render

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Understand why a hooks-based React app feels slower than expected.

REASON 2

Learn how new callback functions defeat React.memo optimizations.

REASON 3

Compare measured render timings between hooks and class components.

REASON 4

Get guidance on managing hook dependencies to avoid unnecessary re-renders.

What's in the stack?

JavaScriptReact

How it stacks up

gaearon/hooks-perf-issues09catho/axonabdulrdeveloper/react--tic-tac-toe
Stars131313
LanguageJavaScriptJavaScriptJavaScript
Last pushed2019-03-03
MaintenanceDormant
Setup difficultyeasymoderateeasy
Complexity2/54/51/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Yoink these prompts

Prompt 1
Explain why this repo's hook version is 4-5x slower than the class version.
Prompt 2
Show me how React.memo fails to prevent re-renders when callbacks change identity.
Prompt 3
Help me apply the lesson from gaearon/hooks-perf-issues to fix slow re-renders in my own React app.
Prompt 4
What are the fixes for the callback-identity problem shown in this repo?

Frequently asked questions

wtf is hooks-perf-issues?

A teaching demo showing how React hooks can make UI updates 4-5x slower than class components if callback functions aren't handled carefully.

What language is hooks-perf-issues written in?

Mainly JavaScript. The stack also includes JavaScript, React.

Is hooks-perf-issues actively maintained?

Dormant — no commits in 2+ years (last push 2019-03-03).

How hard is hooks-perf-issues to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is hooks-perf-issues for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.