Guest User

Untitled

a guest
Nov 22nd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. shouldComponentUpdate(nextProps, nextState){
  2. console.log("component should update")
  3. if(nextProps.status === POST_STATUS.POST_STATUS_SAVED) {
  4. this._closePost()
  5. }
  6. return true
  7. }
  8.  
  9. const mapStateToProps = (state, props) => {
  10. const { status } = state.newPost
  11. return {
  12. ...props,
  13. state,
  14. };
  15. };
Add Comment
Please, Sign In to add comment