dillon1000/react
Commit
Browse files Use strings as the type for DOM elements
This makes ReactDOM a simple helper for creating ReactElements with the string tag as the type. The actual class is internal and created by instantiateReactComponent. Configurable using injection. There's not a separate class for each tag. There's just a generic ReactDOMComponent which could take any tag name. Invididual tags can be wrapped. When wrapping happens you can return the same tag again. If the wrapper returns the same string, then we fall back to the generic component. This avoids recursion in a single level wrapper.
Changed paths16 files
First-parent comparisonsrc/browser/ReactDOM.js ModifiedM src/browser/server/ReactServerRendering.js ModifiedM src/browser/ui/ReactDOMComponent.js ModifiedM src/browser/ui/ReactDefaultInjection.js ModifiedM src/browser/ui/ReactInjection.js ModifiedM src/browser/ui/ReactMount.js ModifiedM src/browser/ui/dom/components/createFullPageComponent.js ModifiedM src/core/ReactCompositeComponent.js ModifiedM src/core/ReactDescriptor.js ModifiedM src/core/ReactEmptyComponent.js ModifiedM src/core/ReactMultiChild.js ModifiedA src/core/ReactNativeComponent.js AddedM src/core/ReactPropTransferer.js ModifiedM src/core/__tests__/ReactDescriptor-test.js ModifiedM src/core/instantiateReactComponent.js ModifiedM src/test/reactComponentExpect.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…