TLDR Web Dev · ARTICLES & TUTORIALS

USECONTEXTSELECTOR: SPEEDING UP REACT APPS WITH LARGE CONTEXT

marmelab.com10 min read

Summary from the TLDR Web Dev newsletter

Using large contexts in React applications can lead to performance problems, as changing a single value in a large context can cause unnecessary re-renders of components. There are several proposed solutions: splitting components, splitting contexts, and using state management libraries. The `use-context-selector` library, which this article dives deeper into, provides a way to optimize performance by selecting and re-rendering only the parts of a context that have changed.