facebook / prop-types

Runtime type checking for React props and similar objects
MIT License
4.48k stars 356 forks source link

fixed broken proptypes in prod #232

Closed AndyOGo closed 5 years ago

AndyOGo commented 5 years ago

fixes #231

facebook-github-bot commented 5 years ago

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

AndyOGo commented 5 years ago

I just signed the CLA 🎉

facebook-github-bot commented 5 years ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

ljharb commented 5 years ago

See #106.

LucaMele commented 5 years ago

@ljharb , please reconsider your desicion and instead of a quick check that is similar to the 106 try to find out what we would like to achive here. We wont have performance impact with this and we are consistant between DEV environment and PROD environment.

LucaMele commented 5 years ago

is that not a win win?

ljharb commented 5 years ago

@LucaMele this isn't my decision; i'm not a collaborator here. React team members were pretty clear about it on #106 tho.

LucaMele commented 5 years ago

Hello @ljharb all right sorry :). Well hope that the react team memebers can give it a second chance then. I guess we can call it best practice if minified code does not change logic between PROD and DEV. Only strip out what is not necessary in PROD should be the way to go IMHO, not changing types or logic

ljharb commented 5 years ago

Although I'd prefer this type of fix to go in, closing per https://github.com/facebook/prop-types/pull/106#issuecomment-398443259.