TLDR Web Dev · ARTICLES & TUTORIALS

REACTIVITY IS EASY

romgrk.com9 min read

Summary from the TLDR Web Dev newsletter

This post goes through a simple, elegant solution for fine-grained selector-based reactivity, achieving targeted re-renders using a simple store and `useSelector` hook. It avoids unnecessary re-renders of components by subscribing them to specific slices of state. Furthermore, `use-sync-external-store` can be used for React edge-cases, ergonomic store updates, and memoized selectors for derived state.