Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.

<Rating name='facilityRate' 
emptySymbol={<img src='../star-empty.png' className='icon' alt='empty star' />}
fullSymbol={<img src='../star-full.png' className='icon' alt='filled star' />} 
onChange={this.handleRatingChange} 
value={this.state.form.facilityRate} />


handleRatingChange(value) {
    console.log(value);
    //here set your state for rating
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #type #invalid #expected #string #composite
ADD COMMENT
Topic
Name
5+1 =