You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Imagine using this component in combination with flux stores.
There can be an initial value a user has previously set in another session that is now submitted to the component via the rating prop.
Unfortunately though, when setting the rating prop initially without clicking on it (and triggering handleClick). this.state.ratingCache is not set.
This has the effect that when the user hovers over a initially set rating component, it basically resets it to no rating at all.
So, there should be either a method/flag or what ever that makes sure that the initial value is set in the cache.
The text was updated successfully, but these errors were encountered:
I agree. When I first created this, I wasn't so clear on the necessity to create stateless components. There are some flaws in the architecture that I'll be working to fix. Feel free to submit a PR if you have any new ideas. Thanks for the suggestion.
Imagine using this component in combination with flux stores.
There can be an initial value a user has previously set in another session that is now submitted to the component via the
rating
prop.Unfortunately though, when setting the rating prop initially without clicking on it (and triggering
handleClick
).this.state.ratingCache
is not set.This has the effect that when the user hovers over a initially set rating component, it basically resets it to no rating at all.
So, there should be either a method/flag or what ever that makes sure that the initial value is set in the cache.
The text was updated successfully, but these errors were encountered: