What is reselect and how it works?

Technology CommunityCategory: ReactWhat is reselect and how it works?
VietMX Staff asked 3 years ago

Reselect is a selector library (for Redux) which uses memoization concept. It was originally written to compute derived data from redux-like applications state, but it can’t be tied to any architecture or library.

Reselect keeps a copy of the last inputs/outputs of the last call, and recomputes the result only if one of the inputs changes. If the the same inputs are provided twice in a row, Reselect return the cached saved output. It’s memoization and cache are fully customizable.