Of all concepts in Redux, selectors are the most underestimated. They have recently gained importance by the introduction of React Redux hooks, which make them the primary means of getting data out of Redux into React components. However, I noticed that selectors are often only seen as either “state getters” to hide the Redux state’s shape or as performance optimizations for preventing state-derived values from being needlessly recalculated.

In this post, I’ll show that selectors can be much more than that. Specifically, I’ll demonstrate that they are not only a great tool for accessing Redux state, but also for encapsulating…

Denis Washington

Senior Full-Stack Developer at Futurice, Berlin. Striving for simplicity and clarity in code, architecture, and commuincation. https://denisw.de

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store