title: How to change the initial state set in reducer from another component
body: <p>I have set the initial state in my redux reducer for login auth.Say <code>authError=null</code> on successful login I would like to change it. When I click logout, I want to set <code>authError = ''</code>. </p>
  
  <p>Can I change to readonly state of reducer form a component?</p>
  
  <p><strong>Component</strong></p>
  
  <pre><code>   const {authError} = this.props;
     this.setState(authError = "")
  </code></pre>
  
  <p><strong>Reducer</strong></p>
  
  <pre><code> const initState = {
   authError : '',
   empname : 'test', phoneno:'321' 
   }
  
   const signin = (state = initState, action) =&gt; {
  
  switch(action.type){
    case 'SIGN_IN':
      const empname = action.payload.empname;
      const phoneno = action.cred.phoneno;
      console.log('===============$$$=====================');
      console.log(empname, phoneno);
      console.log('===============$$$=====================');
      return {
        ...state,
        authError : null,
        empname,
        phoneno
     }
  } 
  </code></pre>