<-- Rendered reactRoot of React component.
* // ...
diff --git a/src/core/ReactNativeComponent.js b/src/core/ReactNativeComponent.js
index 07371b2c8f..eddb27ec5f 100644
--- a/src/core/ReactNativeComponent.js
+++ b/src/core/ReactNativeComponent.js
@@ -24,6 +24,7 @@ var DOMPropertyOperations = require('DOMPropertyOperations');
var ReactComponent = require('ReactComponent');
var ReactEventEmitter = require('ReactEventEmitter');
var ReactMultiChild = require('ReactMultiChild');
+var ReactID = require('ReactID');
var escapeTextForBrowser = require('escapeTextForBrowser');
var flattenChildren = require('flattenChildren');
@@ -138,7 +139,7 @@ ReactNativeComponent.Mixin = {
}
}
- return ret + ' id="' + this._rootNodeID + '">';
+ return ret + ' ' + ReactID.ATTR_NAME + '="' + this._rootNodeID + '">';
},
/**
diff --git a/src/core/ReactTextComponent.js b/src/core/ReactTextComponent.js
index 4b7aa495ac..57e56bbce2 100644
--- a/src/core/ReactTextComponent.js
+++ b/src/core/ReactTextComponent.js
@@ -20,6 +20,7 @@
"use strict";
var ReactComponent = require('ReactComponent');
+var ReactID = require('ReactID');
var escapeTextForBrowser = require('escapeTextForBrowser');
var mixInto = require('mixInto');
@@ -57,7 +58,7 @@ mixInto(ReactTextComponent, {
mountComponent: function(rootID) {
ReactComponent.Mixin.mountComponent.call(this, rootID);
return (
- '
' +
+ '' +
escapeTextForBrowser(this.props.text) +
''
);
diff --git a/src/environment/__tests__/ReactServerRendering-test.js b/src/environment/__tests__/ReactServerRendering-test.js
index ebbad6b4b0..c8cc58ebe5 100644
--- a/src/environment/__tests__/ReactServerRendering-test.js
+++ b/src/environment/__tests__/ReactServerRendering-test.js
@@ -24,10 +24,12 @@
require('mock-modules')
.dontMock('ExecutionEnvironment')
.dontMock('React')
+ .dontMock('ReactID')
.dontMock('ReactServerRendering')
.dontMock('ReactTestUtils');
var React;
+var ReactID;
var ReactTestUtils;
var ReactServerRendering;
var ExecutionEnvironment;
@@ -36,6 +38,7 @@ describe('ReactServerRendering', function() {
beforeEach(function() {
require('mock-modules').dumpCache();
React = require('React');
+ ReactID = require('ReactID');
ReactTestUtils = require('ReactTestUtils');
ExecutionEnvironment = require('ExecutionEnvironment');
ExecutionEnvironment.canUseDOM = false;
@@ -51,7 +54,7 @@ describe('ReactServerRendering', function() {
}
);
expect(response).toMatch(
- 'hello world'
+ 'hello world'
);
});
@@ -74,8 +77,12 @@ describe('ReactServerRendering', function() {
}
);
expect(response).toMatch(
- 'My name is ' +
- 'child
'
+ '' +
+ '' +
+ 'My name is ' +
+ 'child' +
+ '' +
+ '
'
);
});
@@ -123,8 +130,10 @@ describe('ReactServerRendering', function() {
);
expect(response).toMatch(
- 'Component name: ' +
- 'TestComponent'
+ '' +
+ 'Component name: ' +
+ 'TestComponent' +
+ ''
);
expect(lifecycle).toEqual(
['getInitialState', 'componentWillMount', 'render']