title: componentWillReceiveProps will update the state only if i refresh the page
body: <p>Hello everyone can you please help me with this :</p>
  
  <p>i am using react + firebase + redux</p>
  
  <p>the last lines in the class look like this (the edit post page):</p>
  
  <pre><code>const mapStateToProps = (state, ownProps) =&gt; {
    const id = ownProps.match.params.id;
    const posts = state.firestore.data.posts;
    const post = posts ? posts[id] : null;
    return {
      post: post,
      auth: state.firebase.auth
    };
  };
  
  const mapDispatshToProps = (dispatch, ownProps) =&gt; {
    return {
      editPost: (id, post) =&gt; dispatch(editPost(id, post, ownProps.history))
    };
  };
  
  export default compose(
    connect(
      mapStateToProps,
      mapDispatshToProps
    ),
    firestoreConnect([{ collection: "posts" }])
  )(CreatePost);
  </code></pre>
  
  <p>after that i have used the componentDidMount to get the post like this :</p>
  
  <pre><code>componentDidMount() {
      const post = this.props.post;
      console.log(post);
  
      this.setState({
        title: post ? post.title : "",
        content: post ? post.content : ""
      });
    }
  </code></pre>
  
  <p>i have also used the componentWillReceiveProps :</p>
  
  <pre><code>componentWillReceiveProps(nextProps) {
      const { post } = nextProps;
      console.log(post);
      this.setState({
        title: post.title,
        content: post.content
      });
    }
  </code></pre>
  
  <p>my ipnut look like this :</p>
  
  <p><code>&lt;input type="text" id="title" value={this.state.title} onChange={this.handleChange} /&gt;</code></p>
  
  <p>the console always dispaly <code>null</code></p>
  
  <p>i did not succeed to get the state updated (the only way to see the update is by refreshing the page)</p>
  
  <p>can you please help me,</p>
  
  <p>thank you</p>