dillon1000/react
Commit
Browse files Warn when defined methods are used in plain JS classes
In ReactClass we use early validation to warn you if a accidentally defined propTypes in the wrong place or if you mispelled componentShouldUpdate. For plain JS classes there is no early validation process. Therefore, we wait to do this validation until the component is mounted before we issue the warning. This should bring us to warning-parity with ReactClass.
Changed paths3 files
First-parent comparisonsrc/classic/class/ReactClass.js ModifiedM src/core/ReactCompositeComponent.js ModifiedM src/modern/class/__tests__/ReactES6Class-test.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…