You are checking whether the prop is not passed and then set it to true, I guess that's the default value and it makes sense. But in the other case where the code enters the else clause (a value is passed to the prop and that overrides it's default value) you explicitly set it to false :question:
The else clauses seem redundant and are the culprits causing the issue, don't you think?
https://github.com/n49/react-stars/blob/master/src/react-stars.js#L40-L50
You are checking whether the prop is not passed and then set it to
true
, I guess that's the default value and it makes sense. But in the other case where the code enters theelse
clause (a value is passed to the prop and that overrides it's default value) you explicitly set it tofalse
:question:The else clauses seem redundant and are the culprits causing the issue, don't you think?