fix(StarRating): There is this in hooks

This commit is contained in:
Gianfrancø Palumbo
2019-04-14 14:19:50 +03:00
committed by GitHub
parent ab10738ba9
commit 45306f4480

View File

@ -29,7 +29,7 @@ function StarRating(props) {
return (
<div
onMouseOut={() => hoverOver(null)}
onClick={(event) => setRating(event.target.getAttribute('star-id') || this.state.rating)}
onClick={(event) => setRating(event.target.getAttribute('star-id') || rating)}
onMouseOver={hoverOver}
>
{Array.from({ length: 5 }, (v, i) => (