From 45306f44809e5e860a7d6850da3898d335184fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gianfranc=C3=B8=20Palumbo?= Date: Sun, 14 Apr 2019 14:19:50 +0300 Subject: [PATCH] fix(StarRating): There is `this` in hooks --- snippets/StarRating.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/StarRating.md b/snippets/StarRating.md index 43d9afa47..a27420d47 100644 --- a/snippets/StarRating.md +++ b/snippets/StarRating.md @@ -29,7 +29,7 @@ function StarRating(props) { return (
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) => (