Skip to content

4.4.8 throws PropTypes validation warnings for React 14 #669

@scottarivale

Description

@scottarivale

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions