Last active
April 8, 2019 23:50
-
-
Save Ledoux/30123db203dec9639a6b1b96f42537e6 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, { Fragment } from 'react' | |
const AddStock = ({ handleAddStock }) => { | |
const [available, setAvailable] = useState(0) | |
return ( | |
<Fragment> | |
<input | |
onChange={event => setAvailable(event.target.value)} | |
value={available} | |
/> | |
<button onClick={handleAddStock(available)}> | |
Add | |
</button> | |
</Fragment> | |
) | |
} | |
export default AddStock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment