What are selectors in redux? : <p>I am trying to follow this <a href="https://github.com/yelouafi/redux-saga/blob/7628def689433e678d78d9dd978c14162a1d45f1/examples/real-world/reducers/selectors.js#L2" rel="noreferrer">code</a> in <code>redux-saga</code></p>

<pre><code>export const getUser = (state, login) =&gt; state.entities.users[login]
export const getRepo = (state, fullName) =&gt; state.entities.repos[fullName]
</code></pre>

<p>Which is then used in the saga like <a href="https://github.com/yelouafi/redux-saga/blob/master/examples/real-world/sagas/index.js" rel="noreferrer">this</a>:</p>

<pre><code>import { getUser } from '../reducers/selectors'

// load user unless it is cached
function* loadUser(login, requiredFields) {
  const user = yield select(getUser, login)
  if (!user || requiredFields.some(key =&gt; !user.hasOwnProperty(key))) {
    yield call(fetchUser, login)
  }
}
</code></pre>

<p>This <code>getUser</code> reducer (is it even a reducer) looks very different from what I would normally expect a reducer to look like.</p>

<p>Can anyone explain what a selector is and how <code>getUser</code> is a reducer and how it fits in with redux-saga?</p>
