Created
June 14, 2019 23:13
-
-
Save zackshapiro/4a358e86b92579b01e8f4ea7a450dc19 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import './App.css' | |
const Input = (props) => ( | |
<input type='file' name='file-input' multiple {...props} /> | |
) | |
const App = () => { | |
const onSubmit = (e) => { | |
e.preventDefault() | |
} | |
const onChange = (e) => { | |
console.log(e.target.files) | |
} | |
return ( | |
<div className='container'> | |
<form className='form' onSubmit={onSubmit}> | |
<div> | |
<Input onChange={onChange} /> | |
<button type='submit'>Submit</button> | |
</div> | |
</form> | |
</div> | |
) | |
} | |
export default App |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment