Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proptypes warning in 'react-redux' after Upgrade Babel 7 #8710

Closed
palaniichukdmytro opened this issue Sep 14, 2018 · 5 comments
Closed

Proptypes warning in 'react-redux' after Upgrade Babel 7 #8710

palaniichukdmytro opened this issue Sep 14, 2018 · 5 comments
Labels
Needs Info outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@palaniichukdmytro
Copy link

Bug Report

Current Behavior
After migration to Babel 7, arised such kind of warning. Looks like it belongs to react-redux connect.
Is not correct proptypes for propValue.hasOwnProperty

Input Code

Warning: Failed prop type: propValue.hasOwnProperty is not a function
    in Application (created by Connect(Application))

Expected behavior/code
Do not produce this warning for checkPropTypes.

Babel Configuration (.babelrc, package.json, cli command)

const nodeEnv = process.env.NODE_ENV || 'development'
let presetEnvConfig, plugins

if (nodeEnv === 'test') {
    presetEnvConfig = {targets: {node: 'current'}}
    plugins = ['istanbul']
} else {
    presetEnvConfig = {
        targets: {
            browsers: ['last 1 versions', 'ie >= 11']
        },
        modules: false,
    }
    plugins = ['react-hot-loader/babel']
}

const config = {
    presets: [
        ['@babel/preset-env', presetEnvConfig],
        '@babel/preset-react',
    ],
    plugins: [
        ...plugins,
        "@babel/plugin-syntax-dynamic-import", '@babel/plugin-proposal-class-properties',
        ["@babel/plugin-proposal-decorators", { "legacy": true }],
        "@babel/plugin-proposal-nullish-coalescing-operator",
        "@babel/plugin-proposal-optional-chaining",
        "@babel/plugin-proposal-numeric-separator"
    ],
}

module.exports = config

Environment

  • Babel version(s): [7.0.0]
  • Node/npm version: [Node v10.10.0/npm 6.4.1]
  • OS: [Windows 10]
  • How you are using Babel: [loader]

Possible Solution

Additional context/Screenshots

"react-redux": "^5.0.7",
"react-dom": "16.4.0",
 "react": "^16.4.0",
@babel-bot
Copy link
Collaborator

Hey @palaniichukdmytro! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@nicolo-ribaudo
Copy link
Member

nicolo-ribaudo commented Sep 14, 2018

Are you compiling your app in test or developement env? Could you provide a way to reproduce the issue?

@loganfsmyth
Copy link
Member

We definitely need more information here.

@babel-bot
Copy link
Collaborator

Hi @palaniichukdmytro! A maintainer of the project has notified me that you're missing
some information we'll need to replicate this issue.

Please understand that we receive a high volume of issues, and there are only a limited number
of volunteers that help maintain this project. The easier it is for us to decipher an issue with the info provided,
the more likely it is that we'll be able to help.

Please make sure you have the following information documented in this ticket:

  1. Your Babel configuration (typically in the form of a .babelrc)
  2. The current (incorrect) behavior you're seeing
  3. The behavior you expect
  4. A short, self-contained example

Please provide either a link to the problem via the repl, or if the repl is insufficient,
a new and minimal repository with instructions on how to build/replicate the issue.

@xtuc
Copy link
Member

xtuc commented Nov 22, 2018

Not enough informations were provided, closing for now.

@xtuc xtuc closed this as completed Nov 22, 2018
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Feb 21, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Needs Info outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

5 participants