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.
it would be nice if you used the props 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.
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.
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.
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