Remove circular dependencies in React Core.

There is a circular dependency between `ReactID`, `ReactMount` and
`ReactInstanceHandles`. Ben and I talked about this today. It seems like the
simplest solution is to consolidate a lot of the code that Ben recently wrote
into `ReactMount`. We can later find ways to trim code out of this module
without causing circular deps.
This commit is contained in:
Jordan Walke authored and Paul O’Shannessy committed 2013-07-24 17:40:57 -07:00
1 parent 260d90ba02
commit 2ee66262db
21 files changed
+356 -367

No files matched your search

+2 -2
View File
@@ -20,7 +20,7 @@
"use strict";
var ReactComponent = require('ReactComponent');
var ReactID = require('ReactID');
var ReactMount = require('ReactMount');
var escapeTextForBrowser = require('escapeTextForBrowser');
var mixInto = require('mixInto');
@@ -58,7 +58,7 @@ mixInto(ReactTextComponent, {
mountComponent: function(rootID) {
ReactComponent.Mixin.mountComponent.call(this, rootID);
return (
'<span ' + ReactID.ATTR_NAME + '="' + rootID + '">' +
'<span ' + ReactMount.ATTR_NAME + '="' + rootID + '">' +
escapeTextForBrowser(this.props.text) +
'</span>'
);