Skip to content

Create Forms That Have Input in Controlled State - #11

Open
ASPhillips8 wants to merge 3 commits into
learn-co-curriculum:masterfrom
ASPhillips8:working-branch-asp
Open

Create Forms That Have Input in Controlled State#11
ASPhillips8 wants to merge 3 commits into
learn-co-curriculum:masterfrom
ASPhillips8:working-branch-asp

Conversation

@ASPhillips8

Copy link
Copy Markdown

Created Filter Component that have controlled state. Filter Component filters shopping list based on match in cart. Create Item Form that updates state to add new item to shopping cart
Screenshot 2024-06-13 at 10 37 25 AM

@stephenmckeon stephenmckeon left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Nice job.

@@ -1,17 +1,39 @@
import React from "react";
import React, {useState} from "react";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import React, {useState} from "react";
import React, { useState } from "react";

import { v4 as uuid } from "uuid";

function ItemForm(props) {
function ItemForm({onItemFormSubmit}) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function ItemForm({onItemFormSubmit}) {
function ItemForm({ onItemFormSubmit }) {


function handleFormSubmit(event) {
event.preventDefault()
const newItem ={

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const newItem ={
const newItem = {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants