Finish renaming renderComponent -> render
Test Plan: jest
Ben Alpert committed
Nov 20, 2014 at 23:07 UTC
d4e32a7b2c354c1e99134543b41738d121d5b98c
10 files changed
+15
-15
src/browser/server/__tests__/ReactServerRendering-test.js
+2
-2
@@ -50,7 +50,7 @@ describe('ReactServerRendering', function() {
50
ID_ATTRIBUTE_NAME = DOMProperty.ID_ATTRIBUTE_NAME;
51
});
52
53
- describe('renderComponentToString', function() {
53
+ describe('renderToString', function() {
54
it('should generate simple markup', function() {
55
var response = ReactServerRendering.renderToString(
56
<span>hello world</span>
@@ -244,7 +244,7 @@ describe('ReactServerRendering', function() {
244
});
245
});
246
247
- describe('renderComponentToStaticMarkup', function() {
247
+ describe('renderToStaticMarkup', function() {
248
it('should not put checksum and React ID on components', function() {
249
var lifecycle = [];
250
var NestedComponent = React.createClass({
src/browser/ui/ReactMount.js
+2
-2
@@ -377,7 +377,7 @@ var ReactMount = {
377
render: function(nextElement, container, callback) {
378
invariant(
379
ReactElement.isValidElement(nextElement),
380
- 'renderComponent(): Invalid component element.%s',
380
+ 'React.render(): Invalid component element.%s',
381
(
382
typeof nextElement === 'string' ?
383
' Instead of passing an element string, make sure to instantiate ' +
@@ -756,7 +756,7 @@ var ReactMount = {
756
'You\'re trying to render a component to the document but ' +
757
'you didn\'t use server rendering. We can\'t do this ' +
758
'without using server rendering due to cross-browser quirks. ' +
759
- 'See renderComponentToString() for server rendering.'
759
+ 'See React.renderToString() for server rendering.'
760
);
761
762
setInnerHTML(container, markup);
src/browser/ui/__tests__/ReactMount-test.js
+2
-2
@@ -46,7 +46,7 @@ describe('ReactMount', function() {
46
expect(function() {
47
ReactTestUtils.renderIntoDocument('div');
48
}).toThrow(
49
- 'Invariant Violation: renderComponent(): Invalid component element. ' +
49
+ 'Invariant Violation: React.render(): Invalid component element. ' +
50
'Instead of passing an element string, make sure to instantiate it ' +
51
'by passing it to React.createElement.'
52
);
@@ -61,7 +61,7 @@ describe('ReactMount', function() {
61
expect(function() {
62
ReactTestUtils.renderIntoDocument(Component);
63
}).toThrow(
64
- 'Invariant Violation: renderComponent(): Invalid component element. ' +
64
+ 'Invariant Violation: React.render(): Invalid component element. ' +
65
'Instead of passing a component class, make sure to instantiate it ' +
66
'by passing it to React.createElement.'
67
);
src/browser/ui/__tests__/ReactRenderDocument-test.js
+1
-1
@@ -240,7 +240,7 @@ describe('rendering React components at document', function() {
240
'Invariant Violation: You\'re trying to render a component to the ' +
241
'document but you didn\'t use server rendering. We can\'t do this ' +
242
'without using server rendering due to cross-browser quirks. See ' +
243
- 'renderComponentToString() for server rendering.'
243
+ 'React.renderToString() for server rendering.'
244
);
245
});
246
src/browser/ui/dom/Danger.js
+1
-1
@@ -170,7 +170,7 @@ var Danger = {
170
'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' +
171
'<html> node. This is because browser quirks make this unreliable ' +
172
'and/or slow. If you want to render to the root you must use ' +
173
- 'server rendering. See renderComponentToString().'
173
+ 'server rendering. See React.renderToString().'
174
);
175
176
var newChild = createNodesFromMarkup(markup, emptyFunction)[0];
src/core/ReactComponent.js
+2
-2
@@ -166,8 +166,8 @@ var ReactComponent = {
166
167
/**
168
* Get the publicly accessible representation of this component - i.e. what
169
- * is exposed by refs and renderComponent. Can be null for stateless
170
- * components.
169
+ * is exposed by refs and returned by React.render. Can be null for
170
+ * stateless components.
171
*
172
* @return {?ReactComponent} the actual sibling Component.
173
* @internal
src/core/ReactCompositeComponent.js
+2
-2
@@ -517,7 +517,7 @@ var ReactCompositeComponentMixin = assign({},
517
propTypes[propName](props, propName, componentName, location);
518
if (error instanceof Error) {
519
// We may want to extend this logic for similar errors in
520
- // renderComponent calls, so I'm abstracting it away into
520
+ // React.render calls, so I'm abstracting it away into
521
// a function to minimize refactoring in the future
522
var addendum = getDeclarationErrorAddendum(this);
523
warning(false, error.message + addendum);
@@ -864,7 +864,7 @@ var ReactCompositeComponentMixin = assign({},
864
865
/**
866
* Get the publicly accessible representation of this component - i.e. what
867
- * is exposed by refs and renderComponent. Can be null for stateless
867
+ * is exposed by refs and returned by React.render. Can be null for stateless
868
* components.
869
*
870
* @return {ReactComponent} the public component instance.
src/core/ReactElementValidator.js
+1
-1
@@ -120,7 +120,7 @@ function warnAndMonitorForKeyUse(warningID, message, element, parentType) {
120
121
message += ownerName ?
122
` Check the render method of ${ownerName}.` :
123
- ` Check the renderComponent call using <${parentName}>.`;
123
+ ` Check the React.render call using <${parentName}>.`;
124
125
// Usually the current owner is the offender, but if it accepts children as a
126
// property, it may be the creator of the child that's responsible for
src/core/__tests__/ReactEmptyComponent-test.js
+1
-1
@@ -228,7 +228,7 @@ describe('ReactEmptyComponent', function() {
228
expect(function() {
229
React.render(null, div);
230
}).toThrow(
231
- 'Invariant Violation: renderComponent(): Invalid component element.'
231
+ 'Invariant Violation: React.render(): Invalid component element.'
232
);
233
});
234
});
src/core/__tests__/ReactUpdates-test.js
+1
-1
@@ -641,7 +641,7 @@ describe('ReactUpdates', function() {
641
componentDidMount: function() {
642
instances.push(this);
643
if (this.props.depth < this.props.count) {
644
- React.renderComponent(
644
+ React.render(
645
<MockComponent
646
depth={this.props.depth + 1}
647
count={this.props.count}