title: How to use store.select() to get the root level state using ngrx in Angular2?
body: <p>I have been struggling with this problem for a while now.</p>
  
  <p>I am trying to get a reference to an object stored in a redux store using ngrx in Angular2. I have the following situation:</p>
  
  <pre><code>import {User} from "./user";
  
  export class SessionState{
    constructor(
      public user: User,
      public currentCompanyId: number,
      public currentDepartmentId: number
    ) { }
  }
  </code></pre>
  
  <p>Then the following code:</p>
  
  <pre><code>export class SidebarComponent implements OnInit {
  
    constructor(private sessionStore: Store&lt;SessionStore&gt;, private router: Router,) { }
  
    sessionState: Observable&lt;SessionState&gt;;
    user: Observable&lt;User&gt;;
    currentCompanyId: Observable&lt;number&gt;;
    currentDepartmentId: Observable&lt;number&gt;;
  
    ngOnInit(){
      this.sessionState = this.sessionStore.select("sessionState");
      this.user = this.sessionStore.select("user");
      this.user.subscribe(user =&gt; console.log(user));
      this.sessionState.subscribe(state =&gt; console.log(state));
    }
  }
  </code></pre>
  
  <p>Now the user prints out just fine, however the whole sessionState gives an undefined. I've tried using select(""), select() and other alternative of this method, but can't seem to actually find the right way of getting an observable of the whole sessionState. </p>
  
  <p>What's going wrong here?</p>