“Select” effect from Redux Saga

ref – https://stackoverflow.com/questions/38405700/getstate-in-redux-saga

We want to listen for DESERIALIZE actions. Once we detect one, we want to run function deserialize.

where deserialize is:

Problem is, how do we get state of the store?

The answer is that we can use select to the store’s state.

You can also declare a function that filters out what state properties you need, and select will literally “select” the data from the store for you