n49 / react-stars

A simple star rating component for your React projects :star:
http://developers.n49.com/react-stars/
218 stars 81 forks source link

Half stars not appearing, even with value={4.5} and half={true} #23

Closed FredGauld closed 7 years ago

FredGauld commented 7 years ago

Hi! Thanks for the nice component. I have one issue with it though, I can't get the half stars to show.

Half stars not appearing, even with value={4.5} and half={true}

Any ideas why ?

olegberman commented 7 years ago

Have you tried running examples? Does it work there?

FredGauld commented 7 years ago

Thanks. Yeah, I ran the examples and I figured out what the problem was. Half stars are activated by default. I was adding half={true} in the props, and apparently, specifying the default caused the half stars to not work. Also, I was importing ReactStars and using that as a component. I imitated was you did in the examples instead and imported Stars from react-stars instead. So, works fine now. Thanks a bunch for this cool plugin! Cheers from Montreal, Québec, Canada.

sidd1707 commented 1 year ago

@FredGauld I am using like below and still half star does not seems to be working. (version - 2.2.5)

import ReactStars from 'react-stars';

<ReactStars count={5} value={4.8} edit={false}/>
Screenshot 2023-02-22 at 1 18 35 PM