Loading tutorials
useState, and how props flow between components. It also assumes you know that a component re-renders when its state or its parent changes. Later chapters add memo, useMemo, and useCallback. Each of them adds code and has a cost, so you shou3 min readReact.memo, useMemo, and useCallback all depend on the answer. It assumes you know function components, JSX, `useS2 min readuseState, and that JavaScript objects, arrays and functions are compared by reference. It builds on the earlier chapters about why components re-render and how Object.is compares values.3 min readuseState, props, and that JavaScript objects, arrays and functions are reference values. It builds on React.memo and referential equality from earlier chapters.2 min readuseState and useEffect, and that objects, arrays and functions are reference values in JavaScript. Earlier chapters covered referential equality and why unstable props defeat memo. Here you will see how React decides whether a hook should run 2 min readuseState, and how JavaScript compares objects and arrays by reference. It also assumes you have read the earlier chapters on referential equality, React.memo, and dependency arrays.3 min readuseState, props, and that JavaScript functions are reference values. It builds on React.memo, referential equality, and useMemo.3 min readuseState triggers re-renders, how props and children work, and that a parent re-render re-renders its children by default. Before reaching for memo, useMemo or useCallback, check whether the state lives in the wrong place. Fixing that costs no comparisons 2 min readuseState, props and children, and how React.memo compares props shallowly. Here you will see how context updates interact with memo, and how to limit the re-renders they cause.3 min readReact.memo compares props shallowly with Object.is, and why inline objects and functions break that check. It covers the second argument to memo, when it helps, and how it causes stale UI.3 min readuseState, props, and that objects, arrays and functions are compared by reference. It also assumes you have met React.memo, useMemo and useCallback. Here you will learn when they add cost, when they do nothing, and what to try first.3 min readReact.memo, useMemo, useCallback, dependency arrays, and referential equality from the earlier chapters. It explains how the React Compiler automates much of that work and what you still need to do yourself.3 min read