Chapter 8 · Example 3 · React Context and performance
Provider re-render problem
An unrelated scroll state in a parent above the provider re-creates its value object, so every Context consumer re-renders on each scroll event.
Loading live editor…
Chapter 8 · Example 3 · React Context and performance
An unrelated scroll state in a parent above the provider re-creates its value object, so every Context consumer re-renders on each scroll event.