The library for web and native user interfaces.
Remove React.createComponentRenderer
Remove ReactMount.createComponentRenderer because it does not function correctly. var f = React.createComponentRenderer(<div />); var container1 = document.createElement('div'); var container2 = document.createElement('div'); f(container1); f(container2); // error because mounting same instance into new root
CommitSyncScript committed
Jun 7, 2013 at 22:04 UTC
582359aeea9b7c437cfc12b8e4f3366aaacf11a1
2 files changed
-18
src/core/React.js
-1
@@ -34,7 +34,6 @@ var React = {
34
},
35
autoBind: ReactCompositeComponent.autoBind,
36
createClass: ReactCompositeComponent.createClass,
37
- createComponentRenderer: ReactMount.createComponentRenderer,
37
constructAndRenderComponent: ReactMount.constructAndRenderComponent,
38
constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID,
39
renderComponent: ReactMount.renderComponent,
src/core/ReactMount.js
-17
@@ -125,23 +125,6 @@ var ReactMount = {
125
return nextComponent;
126
},
127
128
- /**
129
- * Creates a function that accepts a `container` and renders the supplied
130
- * React component instance into it.
131
- *
132
- * var renderInto = ReactMount.createComponentRenderer(component);
133
- * // ...
134
- * var component = renderInto($('container'));
135
- *
136
- * @param {ReactComponent} component Component instance to render.
137
- * @return {function(DOMElement): ReactComponent}
138
- */
139
- createComponentRenderer: function(component) {
140
- return function(container) {
141
- return ReactMount.renderComponent(component, container);
142
- };
143
- },
144
-
128
/**
129
* Constructs a component instance of `constructor` with `initialProps` and
130
* renders it into the supplied `container`.