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.

4.4.8 throws PropTypes validation warnings for React 14

See original GitHub issue

For every component we use ‘connect’ in, we get the following JS warning on every render:

Warning: Failed Context Types: Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types Check the render method of `[NAME OF COMPONENT]`

Right now, each page load brings about 2000 of these warnings.

For example, using the following component throws warnings:

import React, { Component } from 'react'
import { connect } from 'react-redux'

class FeedCard extends Component {
  render() {
   return <div />
  }
}

export default connect(null, {
  updateFeedItem,
})(FeedCard)

But simply removing the ‘connect’ usage “fixes” the problem (although it renders the component useless):

import React, { Component } from 'react'
import { connect } from 'react-redux'

class FeedCard extends Component {
  render() {
   return <div />
  }
}

export default FeedCard

I confirmed that downgrading to 4.4.7 makes the issue go away. We are using React 0.14.8

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

17reactions
gaearoncommented, Apr 12, 2017

Okay, react@0.14.9 and react-dom@0.14.9 are out, and they should play nice with prop-types. Other React-related packages were not updated. Let me know if it helps.

10reactions
timdorrcommented, Apr 12, 2017

Look at Dan go!

Looks like the issue is upstream with React itself, so I’m closing this one out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Don't Call PropTypes Warning - React
Once this happens, any code that calls these functions manually (that isn't stripped in production) will throw an error. Declaring PropTypes is still...
Read more >
React eslint error missing in props validation - Stack Overflow
I got this error because I copied and pasted the object from a different with a slightly different name and forgot to change...
Read more >
error 'children' is missing in props validation react/prop-types
It's because you are exporting the stateless component directly without any variable holding it meanwhile you are creating propTypes and defaultProps for ...
Read more >
prop-types - npm
Runtime type checking for React props and similar objects. ... standalone prop-types , all validator functions will start throwing an error ...
Read more >
React eslint error missing in props validation - SyntaxFix
I have the next code, eslint throw: react/prop-types onClickOut; is missing in props validation. react/prop-types children; ... Asked on 2016-07-31 14:19:33 ...
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