React-select: Warning: getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.

Created on 12 Jul 2017  路  9Comments  路  Source: JedWatson/react-select

Hi,

Warning: getDefaultProps is only used on classic React.createClass definitions. Use a static property nameddefaultPropsinstead. is an annoying React warning, which seems to disappear once I rebuild the project by running npm run build or gulp clean && NODE_ENV=production gulp build (as in package.json file).

Since contributing guidelines specifically prohibit making a PR with build files, I did not open one. However, it would be really nice to get rid of those warnings, especially given that it's just a single build away.

Most helpful comment

@agirton The warning is also being displayed in here. Any ETA for the fix?

All 9 comments

This is happening for me too. It's really annoying.

Hi @DeividasK, @gusdaud this will be fixed when we make a release. Until then you should be able to use a previous version where createClass is used.

@agirton you mean a major release or a patch ? Do you know for when is it expected ?

@agirton, is there any word on when a release will be made that will fix this?

@agirton The warning is also being displayed in here. Any ETA for the fix?

Waiting for it too

@agirton any idea on a release date?

Has this been fixed? I'm getting this warning while using react-data-grid and I'd like to be able to tell the author to upgrade to get rid of this super annoying warning. I see this thread is closed but no conclusion or referencing commit / release number.

@martinbliss this was released with https://github.com/JedWatson/react-select/blob/master/HISTORY.md#v100-rc6--2017-09-10. So it has long been fixed.

Was this page helpful?
0 / 5 - 0 ratings