dillon1000/react
Commit
Browse files Move ReactClass, ReactElement and ReactPropTypes into "traditional"
This moves ReactClass, ReactElement and ReactPropTypes into a legacy folder but since it's not quite legacy yet, I call it "classic". These are "classic" because they are decoupled and can be replaced by ES6 classes, JSX and Flow respectively. This also extracts unit tests from ReactCompositeComponent, which was terribly overloaded, into the new corresponding test suites. There is one weird case for ReactContextValidator. This actually happens in core, and technically belongs to ReactCompositeComponent. I'm not sure we will be able to statically validate contexts so this might be a case for dynamic checks even in the future. Leaving the unit tests in classic until we can figure out what to do with them.
Changed paths17 files
First-parent comparisonsrc/classic/__tests__/ReactContextValidator-test.js AddedR src/class/ReactClass.js →src/classic/class/ReactClass.js RenamedR src/core/ReactDoNotBindDeprecated.js →src/classic/class/ReactDoNotBindDeprecated.js RenamedR src/core/__tests__/ReactBind-test.js →src/classic/class/__tests__/ReactBind-test.js RenamedA src/classic/class/__tests__/ReactClass-test.js AddedA src/classic/class/__tests__/ReactClassMixin-test.js AddedR src/core/ReactElement.js →src/classic/element/ReactElement.js RenamedR src/core/ReactElementValidator.js →src/classic/element/ReactElementValidator.js RenamedR src/core/__tests__/ReactElement-test.js →src/classic/element/__tests__/ReactElement-test.js RenamedA src/classic/element/__tests__/ReactElementValidator-test.js AddedR src/core/ReactPropTypeLocationNames.js →src/classic/propTypes/ReactPropTypeLocationNames.js RenamedR src/core/ReactPropTypeLocations.js →src/classic/propTypes/ReactPropTypeLocations.js RenamedR src/core/ReactPropTypes.js →src/classic/propTypes/ReactPropTypes.js RenamedR src/core/__tests__/ReactPropTypes-test.js →src/classic/propTypes/__tests__/ReactPropTypes-test.js RenamedM src/core/__tests__/ReactCompositeComponent-test.js ModifiedD src/core/__tests__/ReactCompositeComponentMixin-test.js DeletedD src/core/__tests__/ReactCompositeComponentSpec-test.js DeletedPatch
Files changed
Rendering syntax-highlighted changes…