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

v3.0.0 - PropTypes warning #276

Closed
ipanasenko opened this issue Aug 29, 2017 · 5 comments
Closed

v3.0.0 - PropTypes warning #276

ipanasenko opened this issue Aug 29, 2017 · 5 comments

Comments

@ipanasenko
Copy link

ipanasenko commented Aug 29, 2017

Hey guys. I've updated to v3.0.0 and now I see a warning in console:

Warning: Accessing PropTypes via the main React package is deprecated, and will be removed in  React v16.0. Use the latest available v15.* prop-types package from npm instead. For info on usage, compatibility, migration and more, see https://fb.me/prop-types-docs

Didn't check, but I think this change in a couple places is to blame: e405109#diff-f5848504b1e287185730035e153a214fR2

Can you check, please?

What's the reason behind such change?

@STRML STRML closed this as completed Aug 29, 2017
@ipanasenko
Copy link
Author

I'm specifically updating react-draggble from 2.2.6 to 3.0.0 and I start seeing PropTypes warnings. I'm trying to find out what causes it. My thought is import * as React from 'react'; somehow triggers using of PropTypes.

@mixtur
Copy link

mixtur commented Aug 31, 2017

Same with me.
Looks like when babel sees import * as React from 'react' it generates code that iterates over all exports of React, therefore PropTypes is also touched, which in turn triggers warning.
The problem should probably go away with upcoming React update, but for now it is very annoying.

@STRML
Copy link
Collaborator

STRML commented Aug 31, 2017

This is fixed in 3.0.3.

@ipanasenko
Copy link
Author

@STRML thank you!

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

3 participants