React NativePerformance & Optimization

36 items

1

Memoized List Item Still Re-renders

Code Quiz
2

Diagnosing FlatList Scroll Jank

Quiz
3

React Native Rendering Performance Internals

Slides / Video
4

Rendering Performance Fundamentals

Flashcard
5

Native Driver Animation Gotcha

Code Quiz
6

Native Driver Animation Limits

Quiz
7

Three Pillars of RN Performance

Flashcard
8

React Native Performance Essentials

Slides / Video
9

Native Driver Animation Jank

Code Quiz
10

Native Driver Animations & JS Thread Jank

Quiz
11

FlatList Performance Props

Flashcard
12

FlatList Performance Optimization

Slides / Video
13

Killing Jank in React Native

Slides / Video
14

Eliminating Jank in React Native

Flashcard
15

FlatList memoization broken by inline callback

Code Quiz
16

FlatList Re-render & Thread Optimization

Quiz
17

FlatList & Keys Performance Basics

Slides / Video
18

FlatList Keys for List Performance

Flashcard
19

Profiling React Native Performance

Slides / Video
20

JS Thread vs UI Thread & FlatList Tuning

Flashcard
21

FlatList Memoization Broken

Code Quiz
22

FlatList Performance Optimization

Quiz
23

React Native Rendering Performance

Slides / Video
24

Optimizing FlatList & Re-renders

Flashcard
25

FlatList vs FlashList Windowing Internals

Quiz
26

FlatList vs FlashList Virtualization

Flashcard
27

FlatList vs FlashList Windowing Internals

Slides / Video
28

Hermes Engine Internals Deep Dive

Slides / Video
29

Hermes Bytecode, GC, and Startup Internals

Quiz
30

Hermes Engine Internals

Flashcard
31

Profiling Frame Drops in React Native

Slides / Video
32

Diagnosing UI Frame Drops in React Native

Quiz
33

Profiling Frame Drops in React Native

Flashcard
34

React Native Threading Model

Quiz
35

React Native Threading Model

Slides / Video
36

React Native Threading Model

Flashcard
Code Quiz

FlatList memoization broken by inline callback

A React.memo item still re-renders on every list update — spot why this optimization fails.

Codejavascript
const Row = React.memo(({ item, onPress }) => {
  console.log('render', item.id);
  return (
    <TouchableOpacity onPress={() => onPress(item.id)}>
      <Text>{item.title}</Text>
    </TouchableOpacity>
  );
});

function List({ data }) {
  const [selected, setSelected] = useState(null);

  const renderItem = ({ item }) => (
    <Row item={item} onPress={(id) => setSelected(id)} />
  );

  return (
    <FlatList
      data={data}
      renderItem={renderItem}
      keyExtractor={(item) => item.id}
    />
  );
}

The Row is wrapped in React.memo but still re-renders every time `selected` changes. What is the bug?