-
Notifications
You must be signed in to change notification settings - Fork 94
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
onHover is broken when passing custom react element symbols #72
Comments
I'm going to fix it for you :) |
Fixed in #73. The examples index.html is so difficult to edit or adjust :) Would be great if we rewrite it to React |
I was about to make this same pull request, thanks @darkowic ! |
@darkowic Oh yes!! It would be great. I have been lazy to change the index page for a loooong time. In the beginning it was created without jsx. Then I just added the browser version of Babel just to make it easier. Even included prism to show the code that generated those ratings. But, I completely agree with you, that it is really painful to modify and add elements. Any proposal? Long time ago I read something about StoryBook but I don't know if it will fit. |
Here is example for reproduce:
https://codesandbox.io/s/oj7mzzww36
I debug it... Problem is that
RatingAPILayer
PureComponent
shouldComponentUpdate
does not handle checking for react element. So, on every onHover execution,RatingAPILayer
will be rerendered which cause multiple rerendering. Another problem is inRating
componentcomponentWillReceiveProps
:I do not understand why on every props update
displayValue
is set tonextProps.value
. But ifshouldComponentUpdate
is handled properly inRatingAPILayer
this is not a problem.The text was updated successfully, but these errors were encountered: