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

Warning Accessing PropTypes via the main React package is deprecated in React 15.5+ #1564

Closed
mattiagalati opened this issue Apr 10, 2017 · 1 comment
Assignees

Comments

@mattiagalati
Copy link

Steps

  • npm install
    • react@15.5.3
    • react-dom@15.5.3
    • babel-core@6.24.1
    • babel-preset-latest@6.24.1
    • babel-preset-react@6.24.1
  • Create an extended custom React.Component that imports Semantic UI React Icon Component
  • Build and open app in Chrome Browser

Expected Result

No warnings

Actual Result

Warning: Accessing PropTypes via the main React package is deprecated. Use the prop-types package from npm instead.
printWarning @ warning.js?8a56:36
warning @ warning.js?8a56:60
get @ React.js?24ef:95
(anonymous) @ IconGroup.js?f416:40

`
process.env.NODE_ENV !== "production" ? IconGroup.propTypes = {
/** An element type to render as (string or function). */
as: customPropTypes.as,

/** Primary content. */
children: PropTypes.node,

/** Additional classes. */
className: PropTypes.string,

/** Size of the icon group. */
size: PropTypes.oneOf(_without(SUI.SIZES, 'medium'))
`

Version

0.67.2

Testcase

@layershifter layershifter self-assigned this Apr 12, 2017
@layershifter
Copy link
Member

PR will come soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants