SHARE
TWEET

Untitled

a guest Sep 15th, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. handleSubmit = e => {
  2.     e.preventDefault()
  3.     const formObj = Array.from(new FormData(e.target).entries())
  4.       .reduce((obj, pair) => ({...obj, [pair[0]]: pair[1]}), {})
  5.     this.props.submitObject(formObj)
  6.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top