-
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
Naheed Edges #35
base: master
Are you sure you want to change the base?
Naheed Edges #35
Conversation
Inspiration BoardWhat We're Looking For
Good work Naheed! It seems like all of your tests work, but need to be updated! Other than that, I have a few comments, but otherwise your project looks good. Good work! |
} | ||
|
||
getCards = () => { | ||
axios.get('https://inspiration-board.herokuapp.com/boards/Naheed/cards') |
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.
it would be nice if you used the prop
s passed into Board
from App
-- url
and boardName
!
addCard = (text, emoji) => { | ||
axios.post(`https://inspiration-board.herokuapp.com/boards/Naheed/cards?text=${text}&emoji=${emoji}`) | ||
.then((response) => { | ||
this.getCards() |
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.
instead of making another get request via this.getCards
, we would prefer that you modify state
deleteCard = (id) => { | ||
axios.delete(`https://inspiration-board.herokuapp.com/cards/${id}`, id) | ||
.then((response) => { | ||
this.getCards() |
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.
like above ... instead of making another get request via this.getCards
, we would prefer that you modify 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 initially tried to update state, but it wouldn't re-render with the changes. When I did a hard refresh the new card would show/delete, but it wouldn't show up on its own after using setState. I wasn't able to find a solution so I went with another get request, but any ideas why setState wouldn't render?
Inspiration Board
Congratulations! You're submitting your assignment!
Comprehension Questions