dillon1000/react

Commit

Re-add the warning if PropType function is called manually (#8903)

* Revert "Revert "Warn if PropType function is called manually (#7132)""

This reverts commit be71f76ed8b7dbad25e3519455605252d3daf683.

In other words, now we again have the warning if you attempt to call PropTypes manually.
It was removed in #8066 but we shouldn't have done this since we still want to avoid people accidentally calling them in production (and even more so since now it would throw).

Fixes #8080.

* Pass secret in ReactControlledValuePropTypes

* Record tests
Browse files
Changed paths6 files
First-parent comparison
M scripts/fiber/tests-passing.txt ModifiedM src/isomorphic/classic/types/ReactPropTypes.js ModifiedM src/isomorphic/classic/types/__tests__/ReactPropTypes-test.js ModifiedM src/renderers/dom/shared/utils/ReactControlledValuePropTypes.js ModifiedA src/shared/types/ReactPropTypesSecret.js AddedM src/shared/types/checkReactTypeSpec.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…