title: React-redux component does not rerender on store state change
body: <p>I'm stating to learn react and redux today, yet I cannot figure out how to force component to rerender after state change.</p>
  
  <p>Here is my code: </p>
  
  <pre><code>const store = createStore(loginReducer);
  export function logout() { return {type: 'USER_LOGIN'} }
  export function logout() { return {type: 'USER_LOGOUT'} }
  export function loginReducer(state={isLogged:false}, action) {
    switch(action.type) {
      case 'USER_LOGIN':
        return {isLogged:true};
      case 'USER_LOGOUT':
        return {isLogged:false};
      default:
  
  
           return state;
        }
      }
  
      class App extends Component {
  
        lout(){
          console.log(store.getState()); //IT SHOW INITIAL STATE
          store.dispatch(login());
          console.log(store.getState()); //IT SHOWS THAT STATE DID CHANGE
        }
  
        ////THIS IS THE PROBLEM, 
      render(){
      console.log('rendering')
      if(store.getState().isLogged){
        return (&lt;MainComponent store={store} /&gt;);
      }else{
        return (
          &lt;View style={style.container}&gt;
            &lt;Text onPress={this.lout}&gt;
            THE FOLLOWING NEVER UPDATE :( !!{store.getState().isLogged?'True':'False'}&lt;/Text&gt;
            &lt;/View&gt;
          );
      }    
  }
  </code></pre>
  
  <p>The only way i could trigger update is by using</p>
  
  <pre><code>store.subscribe(()=&gt;{this.setState({reload:false})});
  </code></pre>
  
  <p>inside constructor, so that i manually trigger an update state of component to force rerender.</p>
  
  <p>but how can i link both store and component states ?</p>