question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Hi,

Warning: getDefaultProps is only used on classic React.createClass definitions. Use a static property named defaultProps instead. 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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:9

github_iconTop GitHub Comments

4reactions
natnmtcommented, Aug 7, 2017

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

2reactions
lord-xeoncommented, Aug 3, 2017

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

getDefaultProps is only used on classic React.createClass ...
js:68 Warning: getDefaultProps is only used on classic React.createClass definitions. Use a static property named defaultProps instead. Here is ...
Read more >
React component method only supported in createReactClass ...
React Warning: getDefaultProps is only used on classic React.createClass definitions. Use a static property named defaultProps instead.
Read more >
getDefaultProps is only used on classic React.createClass ...
blueocean.js:7383 Warning: getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.
Read more >
DefinitelyTyped/DefinitelyTyped - Gitter
Warning : getDefaultProps is only used on classic React.createClass definitions. Use a static property named defaultProps instead.
Read more >
[BIR-19] getDefaultProps is only used on classic React ...
getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found