The library for web and native user interfaces.
Unnecessary `this._rootNodeID` Invariant
Summary: This invariant is unnecessary because `ReactComponent.Mixin.receiveProps` already asserts that this component is mounted. (Being mounted guarantees you have a DOM ID, look at `ReactComponent` and see when `this._rootNodeID` is mutated.)
CommitSyncScript committed
Jun 13, 2013 at 17:36 UTC
b525a0c061fc6a84f41f8349c2d1d5ba2289d772
1 file changed
+1
-5
src/core/ReactNativeComponent.js
+1
-5
@@ -180,12 +180,8 @@ ReactNativeComponent.Mixin = {
180
* @param {ReactReconcileTransaction} transaction
181
*/
182
receiveProps: function(nextProps, transaction) {
183
- invariant(
184
- this._rootNodeID,
185
- 'Trying to control a native dom element without a backing id'
186
- );
187
- assertValidProps(nextProps);
183
ReactComponent.Mixin.receiveProps.call(this, nextProps, transaction);
184
+ assertValidProps(nextProps);
185
this._updateDOMProperties(nextProps);
186
this._updateDOMChildren(nextProps, transaction);
187
this.props = nextProps;