Loading tutorials
useState, useMemo and useCallback hooks. You should also know that React re-renders a component when its state changes or when its parent re-renders.3 min readuseState, useMemo and useCallback hooks. You should also know that React re-renders a component when its state or its parent changes. If you have used React.memo, you already know the problem this chapter addresses.2 min readuseEffect, and why React re-renders a component. It also assumes you have seen useMemo and useCallback.3 min readuseState, and why React re-renders a component. It also assumes you have read the earlier chapters on the Rules of React and on what the compiler does. Here you will read the code the compiler produces, so you can recognize it in build output and 2 min readuseMemo and useCallback work, and what the compiler's output looks like at a high level. It explains how the React Compiler memoizes more precisely than manual hooks can.3 min readuseState, useMemo and useCallback. It also assumes you have used a build tool such as Vite, Next.js or Babel directly. By the end you will have the React Compiler running in a project and know how to confirm the build picks it up.2 min readuseMemo does. You should also know which React version your project uses. If you don't, check the react entry in package.json.3 min readuseState and useEffect, and that you know the Rules of React from the earlier chapter: render must be pure, and props and state are never mutated. It also assumes you have an ESLint setup. The compiler skips code that breaks those rules3 min readuseMemo, useCallback, memo and useEffect, and that the compiler is already set up in your project. It covers what to do with memoization you wrote before the compiler existed, and when to write new memoization after it.3 min read