Finish renaming renderComponent -> render

Test Plan: jest
This commit is contained in:
Ben Alpert
2014-11-20 23:07:58 -08:00
parent 68ba3b6d18
commit d4e32a7b2c
10 changed files with 15 additions and 15 deletions
@@ -50,7 +50,7 @@ describe('ReactServerRendering', function() {
ID_ATTRIBUTE_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
});
describe('renderComponentToString', function() {
describe('renderToString', function() {
it('should generate simple markup', function() {
var response = ReactServerRendering.renderToString(
<span>hello world</span>
@@ -244,7 +244,7 @@ describe('ReactServerRendering', function() {
});
});
describe('renderComponentToStaticMarkup', function() {
describe('renderToStaticMarkup', function() {
it('should not put checksum and React ID on components', function() {
var lifecycle = [];
var NestedComponent = React.createClass({
+2 -2
View File
@@ -377,7 +377,7 @@ var ReactMount = {
render: function(nextElement, container, callback) {
invariant(
ReactElement.isValidElement(nextElement),
'renderComponent(): Invalid component element.%s',
'React.render(): Invalid component element.%s',
(
typeof nextElement === 'string' ?
' Instead of passing an element string, make sure to instantiate ' +
@@ -756,7 +756,7 @@ var ReactMount = {
'You\'re trying to render a component to the document but ' +
'you didn\'t use server rendering. We can\'t do this ' +
'without using server rendering due to cross-browser quirks. ' +
'See renderComponentToString() for server rendering.'
'See React.renderToString() for server rendering.'
);
setInnerHTML(container, markup);
+2 -2
View File
@@ -46,7 +46,7 @@ describe('ReactMount', function() {
expect(function() {
ReactTestUtils.renderIntoDocument('div');
}).toThrow(
'Invariant Violation: renderComponent(): Invalid component element. ' +
'Invariant Violation: React.render(): Invalid component element. ' +
'Instead of passing an element string, make sure to instantiate it ' +
'by passing it to React.createElement.'
);
@@ -61,7 +61,7 @@ describe('ReactMount', function() {
expect(function() {
ReactTestUtils.renderIntoDocument(Component);
}).toThrow(
'Invariant Violation: renderComponent(): Invalid component element. ' +
'Invariant Violation: React.render(): Invalid component element. ' +
'Instead of passing a component class, make sure to instantiate it ' +
'by passing it to React.createElement.'
);
@@ -240,7 +240,7 @@ describe('rendering React components at document', function() {
'Invariant Violation: You\'re trying to render a component to the ' +
'document but you didn\'t use server rendering. We can\'t do this ' +
'without using server rendering due to cross-browser quirks. See ' +
'renderComponentToString() for server rendering.'
'React.renderToString() for server rendering.'
);
});
+1 -1
View File
@@ -170,7 +170,7 @@ var Danger = {
'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' +
'<html> node. This is because browser quirks make this unreliable ' +
'and/or slow. If you want to render to the root you must use ' +
'server rendering. See renderComponentToString().'
'server rendering. See React.renderToString().'
);
var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
+2 -2
View File
@@ -166,8 +166,8 @@ var ReactComponent = {
/**
* Get the publicly accessible representation of this component - i.e. what
* is exposed by refs and renderComponent. Can be null for stateless
* components.
* is exposed by refs and returned by React.render. Can be null for
* stateless components.
*
* @return {?ReactComponent} the actual sibling Component.
* @internal
+2 -2
View File
@@ -517,7 +517,7 @@ var ReactCompositeComponentMixin = assign({},
propTypes[propName](props, propName, componentName, location);
if (error instanceof Error) {
// We may want to extend this logic for similar errors in
// renderComponent calls, so I'm abstracting it away into
// React.render calls, so I'm abstracting it away into
// a function to minimize refactoring in the future
var addendum = getDeclarationErrorAddendum(this);
warning(false, error.message + addendum);
@@ -864,7 +864,7 @@ var ReactCompositeComponentMixin = assign({},
/**
* Get the publicly accessible representation of this component - i.e. what
* is exposed by refs and renderComponent. Can be null for stateless
* is exposed by refs and returned by React.render. Can be null for stateless
* components.
*
* @return {ReactComponent} the public component instance.
+1 -1
View File
@@ -120,7 +120,7 @@ function warnAndMonitorForKeyUse(warningID, message, element, parentType) {
message += ownerName ?
` Check the render method of ${ownerName}.` :
` Check the renderComponent call using <${parentName}>.`;
` Check the React.render call using <${parentName}>.`;
// Usually the current owner is the offender, but if it accepts children as a
// property, it may be the creator of the child that's responsible for
@@ -228,7 +228,7 @@ describe('ReactEmptyComponent', function() {
expect(function() {
React.render(null, div);
}).toThrow(
'Invariant Violation: renderComponent(): Invalid component element.'
'Invariant Violation: React.render(): Invalid component element.'
);
});
});
+1 -1
View File
@@ -641,7 +641,7 @@ describe('ReactUpdates', function() {
componentDidMount: function() {
instances.push(this);
if (this.props.depth < this.props.count) {
React.renderComponent(
React.render(
<MockComponent
depth={this.props.depth + 1}
count={this.props.count}