react-rating

How to set state of the value when using react-rating component in my form?

好久不见. 提交于 2019-12-08 05:41:56
问题 I'm using React Rating (https://github.com/dreyescat/react-rating) and I'm not sure how to set state for the values for my 2 ratings. The other fields are fine. I'm able to get the values to show in console. I don't know how to set state in handleRatingChange(). Also, when I fill out the other fields after I have done the ratings, the ratings resets. Here is my code: var Rating = require('react-rating') class Assignment extends Component { constructor(props) { super(props) this.state = { form