Hello everyone can you please help me with this :

i am using react + firebase + redux

the last lines in the class look like this (the edit post page):

```
const mapStateToProps = (state, ownProps) => {
  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) => {
  return {
    editPost: (id, post) => dispatch(editPost(id, post, ownProps.history))
  };
};

export default compose(
  connect(
    mapStateToProps,
    mapDispatshToProps
  ),
  firestoreConnect([{ collection: "posts" }])
)(CreatePost);

```

after that i have used the componentDidMount to get the post like this :

```
componentDidMount() {
    const post = this.props.post;
    console.log(post);

    this.setState({
      title: post ? post.title : "",
      content: post ? post.content : ""
    });
  }

```

i have also used the componentWillReceiveProps :

```
componentWillReceiveProps(nextProps) {
    const { post } = nextProps;
    console.log(post);
    this.setState({
      title: post.title,
      content: post.content
    });
  }

```

my ipnut look like this :

`<input type="text" id="title" value={this.state.title} onChange={this.handleChange} />`

the console always dispaly `null`

i did not succeed to get the state updated (the only way to see the update is by refreshing the page)

can you please help me,

thank you