react-star-ratings
react-star-ratings copied to clipboard
Module not found
Is anyone having problems installing the package?
I am getting Module not found: Can't resolve './react-star-ratings'....
I cleared and reinstalled node modules.
using yarn 1.22.5
Had the same issue, just change './react-star-ratings' to 'react-star-ratings' !
@MargVander I changed 'react-star-ratings' to './react-star-ratings' but now not I can't find the Library
Thanks @MargVander
This worked for me
import StarRatings from 'react-star-ratings';
Example with Hooks
const [ rating, setRating ] = useState(2);
return (
<StarRatings
rating={rating}
starRatedColor="blue"
changeRating={(newRating) => setRating( newRating )}
numberOfStars={5}
name='rating'
/>
)