title: Redux Selector for normalized state
body: <p>I need help in creating the selectors for the state which is normalized based on the documentation from <a href="https://redux.js.org/recipes/structuring-reducers/normalizing-state-shape" rel="nofollow noreferrer">redux docs</a></p>
  
  <p><strong>State</strong></p>
  
  <pre><code>{
      "entities": {
          "people": {
              "byId": {
                  "1": {
                      "name": "Test User 1",
                      "classes": ["class1", "class2"],
                      "isSelected": true
                  },
                  "2": {
                      "name": "Test User 2",
                      "classes": ["class2", "class3"],
                      "isSelected": false
                  },
                  "3": {
                      "name": "Test User 3",
                      "classes": ["class4"],
                      "isSelected": false
                  }
              },
              "allIds": ["1", "2", "3"]
          },
          "classes": {
              "byId": {
                  "class1": {
                      "name": "Class 1",
                      "courses": ["course1", "course2"]
                  },
                  "class2": {
                      "name": "Class 2",
                      "courses": ["course2"]
                  },
                  "class3": {
                      "name": "Class 3",
                      "courses": ["course1", "course3"]
                  }
              },
              "allIds": ["class1", "class2", "class3"]
          },
          "courses": {
              "byId": {
                  "course1": {
                      "name": "Course 1"
                  },
                  "course2": {
                      "name": "Course 2"
                  },
                  "course3": {
                      "name": "Course 3"
                  }
              },
              "allIds": ["course1", "course2", "course3"]
          }
      }
  }
  
  </code></pre>
  
  <p>On every people's profile, I want to display the associated classes and courses. I am unable to create selectors to get access to this information.</p>
  
  <p><strong>People's Selector</strong></p>
  
  <pre><code>import { createSelector } from 'reselect';
  
  const getPeopleDetails = createSelector(
      state =&gt; state.entities.people,
      (people) =&gt; people.allIds.reduce(
          (acc, cV) =&gt; {  
              if(people.byId[cV].isSelected) acc.push(people.byId[cV]); return acc; 
          }, [])
  );
  
  export default {
      getPeopleDetails
  }
  </code></pre>
  
  <p>Since <code>createSelector</code> doesn't accept any parameter. For my slice in state for <code>courses</code>; how can I create a selector where to get information for the current selected people's profile?</p>
  
  <p>Should I create a junction table for to depict the relationship between the entities?</p>
  
  <p><em>(I am very new to react/redux)</em></p>