Commit 82640a1a authored by Vivian Che's avatar Vivian Che

removed form

parent a90a99d4
...@@ -13,18 +13,31 @@ function GroceryList () { ...@@ -13,18 +13,31 @@ function GroceryList () {
setList(newList) setList(newList)
} }
const handleCheck = () => {
}
console.log("LIST ", list) console.log("LIST ", list)
console.log(item) console.log(item)
return ( return (
<div> <div>
<h1>Grocery List</h1> <h1>Grocery List</h1>
<form onSubmit={handleSubmit}>
<input type="text" placeholder="Input" value={item} onChange={updateItem} > <input type="text" placeholder="Input" value={item} onChange={updateItem} >
</input> </input>
<button type="submit">Add Item</button> <button onClick={handleSubmit} type="submit">Add Item</button>
</form>
<div>
{list.map((item, idx) => (
<div key={idx}>
<input type="checkbox" value={item} onChange={handleCheck} />
<p>{item}</p>
</div>
))}
</div>
</div> </div>
) )
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment