Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

deprecated proptype validation cannot be disabled by environment state #354

Closed
MichaelRando opened this issue Apr 10, 2017 · 2 comments
Closed

Comments

@MichaelRando
Copy link

Latest node_modules/prop-types/checkPropTypes.js doesn't like the prop type validations. I cannot turn them off because DEV is hardcoded true via:
const DEV = typeof process==='undefined' || !process.env || process.env.NODE_ENV!=='production';

I don't use a mock process lib in the browser, so there's not a easy string substitution that will toggle off that DEV=true.

The warning text is
Warning: You are manually calling a React.PropTypes validation function for the 'store' prop on 'Provider'. This is deprecated and will not work in production with the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.

@developit
Copy link
Member

Hmm - prop-types isn't yet used by preact-compat, it seems like you wanted proptypes:

<script src="//unpkg.com/proptypes"></script>

With that you won't see the warning. We're looking at switching to the new module in #351 & #352, but due to that warning we've not yet made the move.

@lukeed
Copy link
Member

lukeed commented Jul 18, 2017

Probably can be closed, we've moved to prop-types module.

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

No branches or pull requests

4 participants