Intro to React + How I Organize Files
What React actually is, what it is not, and the file structure I reach for on every new project.
A ten-part series from the lunch-and-learn talks I gave to a React team: file organization, hooks, components, state, workers, and testing—in the order they build on each other.
Back to Posts
What React actually is, what it is not, and the file structure I reach for on every new project.
Custom hooks are where the logic you pull out of components goes to live. Here is how to design ones that are reusable instead of just relocated.
What are useMemo and useCallback used for? We go over what they are and when you might want to use them in this post.
What separates a component you're glad to reuse from one you dread touching—props design, composition, and knowing when to split.
A practical ladder for managing state in React: start local, lift when you must, reach for context and a store only when the pain is real.
The reducer model goes global with Redux Toolkit: slices, Immer, async thunks—and an honest look at when a store is the wrong tool.
The main thread runs your JS, your layout, your paint, and every click—all on one thread. The highest-leverage performance move most apps never make is getting heavy work off it.
Part 1 moved one task off the main thread with raw postMessage. Part 2 is the architecture: ergonomic workers, off-thread rendering, and a streaming data pipe that never touches the frame.
A test suite at 99% coverage, all green, and the main feature of the app is broken. Nobody wrote a bad test. That is the interesting part.
The Testing Trophy, use case coverage, and mocking at the network boundary—plus the honest answer to a team coverage gate, which is not to delete it.