-
Notifications
You must be signed in to change notification settings - Fork 45
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
Hayden - Edges (C10) - Inspo Board #44
base: master
Are you sure you want to change the base?
Conversation
…so cards can be deleted
…nt so cards can be added to board
Inspiration BoardWhat We're Looking For
|
delCard = (id) => { | ||
const url = 'https://inspiration-board.herokuapp.com/cards/' + id.toString(); | ||
|
||
axios.delete(url) |
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.
You should use complete words for variable and function names. Your jargon may feel obvious to you, but it will often be less so to your coworkers.
|
||
axios.post(url) | ||
.then((res) => { | ||
let newState = this.state; |
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.
I like that you've kept all the API interaction logic in one place - the callbacks are a little more complex, but I would say it makes the app as a whole much easier to comprehend. Whether or not you intended it, this is a great example of the container component pattern well-applied.
<select className="new-card-form__form-select" name="emoji" onChange={this.onFormChange}> | ||
<option value=""></option> | ||
<option value="heart_eyes">😍</option> | ||
<option value="beer">🍺</option> |
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.
Could you generate these <option>
tags dynamically from EMOJI_LIST
?
Inspiration Board
Congratulations! You're submitting your assignment!
Comprehension Questions