dillon1000/react

Commit

Remove propTypes checks for legacy context (#28324)

Part of https://github.com/facebook/react/pull/28207, this is easy to
land in isolation.

The approach I'm taking is slightly different — instead of leaving
validation on for legacy context, I disable the validation (it's
DEV-only) and leave just the parts that drive the runtime logic. I.e.
`contexTypes` and `childContextTypes` *values* are now ignored, the keys
are used just like before.
Browse files
Changed paths3 files
First-parent comparison
M packages/react-reconciler/src/ReactFiberContext.js ModifiedM packages/react/src/__tests__/ReactContextValidator-test.js ModifiedM packages/react/src/__tests__/ReactJSXElementValidator-test.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…