-
Notifications
You must be signed in to change notification settings - Fork 95
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
Mini challenge5 #99
base: master
Are you sure you want to change the base?
Mini challenge5 #99
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.
good PR. My biggest advice is to move the dispatch
calls as I mention in the comment
}; | ||
|
||
return ( | ||
<> |
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 don't think this empty fragment <>
is necessary here
`; | ||
|
||
export function CardVideoBottom({ title, description }) { | ||
function trucateText(text) { |
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 function can live outside CardVideoBottom
so that it does not get redefined on every render
}); | ||
setButtonClicked(false); | ||
} else { | ||
dispatch({ |
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.
As an optional challenge, try to move the dispatch calls to inside the FavoritesProvider
so that way instead of exposing dispatch
and need to remember the exact type
of action, you expose more straightforward functions like addFavorite
and deleteFavorite
that take the payload as the only parameter
No description provided.