-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completed Forms Lab #9
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome job!!
<input | ||
type="text" | ||
name="search" | ||
value={search} | ||
placeholder="Search..." | ||
onChange={onSearchChange} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<input | |
type="text" | |
name="search" | |
value={search} | |
placeholder="Search..." | |
onChange={onSearchChange} | |
/> | |
<input | |
type="text" | |
name="search" | |
value={search} | |
placeholder="Search..." | |
onChange={onSearchChange} | |
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a warning I continued to be terrible at indenting my component props until you showed me the right way on like Friday or Thursday so apologies in advance but I promise I have gotten better lol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, I see, no worries!
import { v4 as uuid } from "uuid"; | ||
|
||
function ItemForm(props) { | ||
function ItemForm({ onItemFormSubmit }) { | ||
const [newItemName, setNewItem] = useState('') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to keep the naming consistent:
const [newItem, setNewItem] = useState('')
or
const [newItemName, setNewItemName] = useState('')
<select | ||
name="category" | ||
value={newCategory} | ||
onChange={(e) => setNewCategory(e.target.value)} | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Watch the indentation here!
Wrote a controlled filter and form component.