Skip to content

Instantly share code, notes, and snippets.

@zackshapiro
Created June 14, 2019 23:13
Show Gist options
  • Save zackshapiro/4a358e86b92579b01e8f4ea7a450dc19 to your computer and use it in GitHub Desktop.
Save zackshapiro/4a358e86b92579b01e8f4ea7a450dc19 to your computer and use it in GitHub Desktop.
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