title: edit image in React form
body: <p>I have a form in a React app, and I want to edit the values, everything works fine, but I can't figure out how to do with to the image. 
  this is the form to create the profile</p>
  
  <pre><code>onSubmit = e =&gt; {
  e.preventDefault();
  
  const {
    handle,
    status,
    bio,
    facebook,
    twitter,
    youtube,
    instagram,
    profileImage
  } = this.state;
  
  let formData = new FormData();
  
  formData.append("handle", handle);
  formData.append("status", status);
  formData.append("bio", bio);
  formData.append("facebook", facebook);
  formData.append("twitter", twitter);
  formData.append("youtube", youtube);
  formData.append("instagram", instagram);
  formData.append("profileImage", profileImage);
  
  this.props.createProfile(formData, this.props.history); };
  
   onChange = e =&gt; {
  switch (e.target.name) {
    case "profileImage":
      this.setState({ profileImage: e.target.files[0] });
      break;
    default:
      this.setState({ [e.target.name]: e.target.value });
  }
  </code></pre>
  
  <p>};</p>
  
  <p>and this is the edit form</p>
  
  <pre><code>componentDidMount() {
  this.props.getCurrentProfile();
  }
  
  componentWillReceiveProps(nextProps) {
  if (nextProps.errors) {
    this.setState({ errors: nextProps.errors });
  }
  
  if (nextProps.profile.profile) {
    const { profile } = nextProps.profile;
    // if empty make empty string
    profile.bio = isEmpty(profile.bio) ? "" : profile.bio;
    profile.social = isEmpty(profile.social) ? {} : profile.social;
    profile.facebook = isEmpty(profile.social.facebook)
      ? ""
      : profile.social.facebook;
    profile.twitter = isEmpty(profile.social.twitter)
      ? ""
      : profile.social.twitter;
    profile.instagram = isEmpty(profile.social.instagram)
      ? ""
      : profile.social.instagram;
    profile.youtube = isEmpty(profile.social.youtube)
      ? ""
      : profile.social.youtube;
    profile.profileImage = isEmpty(profile.profileImage)
      ? ""
      : profile.profileImage;
    // set to state
    this.setState({
      handle: profile.handle,
      status: profile.status,
      bio: profile.bio,
      facebook: profile.facebook,
      twitter: profile.twitter,
      instagram: profile.instagram,
      youtube: profile.youtube,
      profileImage: profile.profileImage
    });
    }
   }
  
   onSubmit = e =&gt; {
   e.preventDefault();
  
   const {
    handle,
    status,
    bio,
    facebook,
    twitter,
    youtube,
    instagram,
    profileImage
  } = this.state;
  
  let formData = new FormData();
  
  formData.append("handle", handle);
  formData.append("status", status);
  formData.append("bio", bio);
  formData.append("facebook", facebook);
  formData.append("twitter", twitter);
  formData.append("youtube", youtube);
  formData.append("instagram", instagram);
  formData.append("profileImage", profileImage);
  
  this.props.createProfile(formData, this.props.history);
  };
  
  onChange = e =&gt; {
   switch (e.target.name) {
     case "profileImage":
       this.setState({ profileImage: e.target.files[0] });
       break;
     default:
        this.setState({ [e.target.name]: e.target.value });
    }
   };
  </code></pre>
  
  <p>So, I'm able to get the form fields from the state and fill the  edit form, and I can display the image if I wanted, but I want the image to stay the same if the user doesn't choose a new one, the current code make the image empty if you don't choose anything. I hope I was clear.</p>