Example of how to create a rating widget using React