Fix ref behavior for remounting

I'm thinking that setting up `this.refs` in `mountComponent` is better than `construct`. Followed the same pattern as `ReactComponent.Mixin` and nulling out
the value in `construct` and setting it to its initial value in `mountComponent`.
This commit is contained in:
Pete Hunt
2014-03-16 22:01:54 -07:00
committed by Paul O’Shannessy
parent 04f9887f0e
commit d889a01caf
2 changed files with 0 additions and 5 deletions
-1
View File
@@ -978,7 +978,6 @@ var ReactCompositeComponentMixin = {
this._renderedComponent = null;
ReactComponent.Mixin.unmountComponent.call(this);
ReactOwner.Mixin.unmountComponent.call(this);
// Some existing components rely on this.props even after they've been
// destroyed (in event handlers).
-4
View File
@@ -150,10 +150,6 @@ var ReactOwner = {
*/
detachRef: function(ref) {
delete this.refs[ref];
},
unmountComponent: function() {
this.refs = null;
}
}