Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rating: RatingIcon throws warning in React 16 #2057

Closed
DennisKo opened this issue Sep 8, 2017 · 1 comment
Closed

Rating: RatingIcon throws warning in React 16 #2057

DennisKo opened this issue Sep 8, 2017 · 1 comment
Labels

Comments

@DennisKo
Copy link
Contributor

DennisKo commented Sep 8, 2017

Steps

Take the Rating example from the docs:
<Rating maxRating={5} defaultRating={3} icon='star' size='mini' />

Expected Result

It works without warning.

Actual Result

React throws a warning:
Warning: Setting defaultProps as an instance property on RatingIcon is not supported and will be ignored. Instead, define defaultProps as a static property on RatingIcon.

Version

0.72.0 + React 16.0.0-rc.2

@layershifter
Copy link
Member

layershifter commented Sep 8, 2017

@DennisKo Thanks for report. There is a typo.

RatingIcon.js

- defaultProps = {
+ static defaultProps = {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants