score:-1

dispatching an action inside a reducer is not a good move. as i understand, you have to do some update synchronously. one way is, once the first reducer is updated, where ever your are consuming that reducer go and inside componentwillreceiveprops or componentdidupdate do something like. note: before dispatching you have to import the configurestore and create a const dispatch from store.

componentwillreceiveprops(nextprops)
 {
  //only if user was not there previously and now user is there
     if(!this.props.user && nextprops.user)
      {
         dispatch({type: second_action, payload})
     }
 }

Related Query

More Query from same tag