componentWillReceiveProps(nextProps) {

        this.setState({
            id: nextProps.id,
            goalTitle: nextProps.goalTitle,
            goalDescription: nextProps.goalDescription,
            goalImage: nextProps.goalImage,
            starred: nextProps.starred,
            selectedValue: ''
        });
    }
// Used to initialize the component with the previous state
Used to initialize the component with the previous state
Used to initialize the component with the previous state
componentWillReceiveProps(nextProps) {
        this.setState({
            id: nextProps.id,
            goalTitle: nextProps.goalTitle,
            goalDescription: nextProps.goalDescription,
            goalImage: nextProps.goalImage,
            starred: nextProps.starred,
            selectedValue: ''
        });
    }
componentWillReceiveProps ( nextProps ) { this . setState ( { id : nextProps . id , goalTitle : nextProps . goalTitle , goalDescription : nextProps . goalDescription , goalImage : nextProps . goalImage , starred : nextProps . starred , selectedValue : '' } ) ; }
Used to initialize the component with the previous state
Used to initialize the component with the previous state