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

Open
palaniichukdmytro opened this Issue Sep 14, 2018 · 3 comments

Comments

Projects
None yet
4 participants
@palaniichukdmytro

palaniichukdmytro commented Sep 14, 2018

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

This comment has been minimized.

Show comment
Hide comment
@babel-bot

babel-bot Sep 14, 2018

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.

Collaborator

babel-bot commented Sep 14, 2018

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

This comment has been minimized.

Show comment
Hide comment
@nicolo-ribaudo

nicolo-ribaudo Sep 14, 2018

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@loganfsmyth

loganfsmyth Sep 15, 2018

Member

We definitely need more information here.

Member

loganfsmyth commented Sep 15, 2018

We definitely need more information here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment