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.

[React 16.2] Warning: Component Menu declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?

See original GitHub issue

Version

2.0.1

Steps to reproduce

  1. Install React 16.2, as it only repros with the latest version.
  2. In Chrome (or probably any other browser), open the dev console.
  3. Take any Typeahead instance you might have, and type enough characters to show the menu.

Expected Behavior

  1. No warnings/errors.

Actual Behavior

As soon as the menu pops up, React shows the following: Warning: Component Menu declared ``PropTypes`` instead of ``propTypes``. Did you misspell the property assignment?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

73reactions
illiteratewritercommented, Apr 3, 2018

@ToJen The error you’re seeing might be because you did something like

FieldWrapper.PropTypes = {
 foo: PropTypes.string.isRequired
}

the first PropTypes is supposed to be a small letter. It should be

FieldWrapper.propTypes = {
  foo: PropTypes.string.isRequired
}
1reaction
ToJencommented, Apr 2, 2018

Looks like this issue still exists:

Warning: Component FieldWrapper declared ``PropTypes`` instead of ``propTypes``. Did you misspell the property assignment?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Component [ComponentName] declared `PropTypes` instead ...
Error : Component [ComponentName] declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment? Ask Question. Asked 1 ...
Read more >
Don't Call PropTypes Warning - React
bool . This pattern by itself is fine, but triggers a false positive because React thinks you are calling PropTypes directly. The next...
Read more >
Upgrade ReactJS.NET 5.0.0 and React 16.8 for the ASP.NET ...
Warning : Component popover declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment? The solution is to replace PropTypes with ...
Read more >
How to validate React props using PropTypes - LogRocket Blog
We can use React props, short for properties, to send data from one component to another. If a component receives the wrong type...
Read more >
prop-types - npm
You can use prop-types to document the intended types of properties passed to components. React (and potentially other libraries—see the ...
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