redux check state at componentWillMount
<p>in my react component, I have two attributes in the state, one in local react state and the other in Redux store.</p>

<pre><code>    componentWillMount() {
      this.props.fetchExercise(this.props.params.id);
    }    
     constructor(props) {
       super(props); 
       this.state = {editeMode: false}
   }

    function mapStateToProps(state) {
      return {currentExercise: state.currentExercise}
   }

    export default connect(mapStateToProps, {fetchExercise})(createNewExercisePage);
</code></pre>

<p>so according to the path; <code>/new-exe/:id</code> currentExercise in Redux is either empty or something is fetched. editeMode is in React. now I want to check if I have something in <code>currentExercise</code> <code>editemode:true</code> else it should be false (according to false and true I am showing different buttons).
I tried it (with lodash) in <code>componentWillMount(){... this.setState({editeMode:_.isNull(this.props.currentExercise)})}</code>
but it does not work, it reamins false.
generaly in these cases that first should fetch something then check it, what should be the approach.</p>