Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shouldComponentUpdate(nextProps, nextState){
- console.log("component should update")
- if(nextProps.status === POST_STATUS.POST_STATUS_SAVED) {
- this._closePost()
- }
- return true
- }
- const mapStateToProps = (state, props) => {
- const { status } = state.newPost
- return {
- ...props,
- state,
- };
- };
Add Comment
Please, Sign In to add comment