-
Notifications
You must be signed in to change notification settings - Fork 19
HomeWork #3 Pull Request #5
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
base: main
Are you sure you want to change the base?
HomeWork #3 Pull Request #5
Conversation
…ks. Need a remove button
… shopping cart. need to fix total amount charged
…ue. Debating on final layout
…t for BnBForm. Will follow up with linting and PropTypes validation
| key: PropTypes.number.isRequired, | ||
| onAdd: PropTypes.func.isRequired, | ||
|
|
||
| } |
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.
Nice use of components 👍
| const [name, setName]= useState("") | ||
| const [isSuperhost, setisSuperhost]= useState(false) | ||
| const [stars, setStars]= useState("") | ||
| const [reviews, setReviews]= 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.
This would be a good case where you could make an object to hold all of this state, and use one setter to set everything. Example:
const [form, setForm] = useState({
houseType: '',
image: '',
...
});
const setAttribute = (attribute, value) => {
setForm({...form, [attribute]: value});
}
Week 3 HW Submission
Please fill out the information below in order to complete your assignment. Feel free to update this comment later if necessary.