mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
fix warnings in ReactComponentLifeCycle test
Don't use inputs to avoid warnings in tests
This commit is contained in:
committed by
Paul O’Shannessy
parent
01d41f6e18
commit
9e9d8dbe76
@@ -356,15 +356,15 @@ describe('ReactComponentLifeCycle', function() {
|
||||
var PropsUpdaterInOnDOMReady = React.createClass({
|
||||
componentDidMount: function() {
|
||||
this.refs.theSimpleComponent.setProps({
|
||||
value: this.props.valueToUseInOnDOMReady
|
||||
valueToUseInitially: this.props.valueToUseInOnDOMReady
|
||||
});
|
||||
},
|
||||
render: function() {
|
||||
return (
|
||||
<input
|
||||
value={this.props.valueToUseInitially}
|
||||
ref="theSimpleComponent">
|
||||
</input>
|
||||
<div
|
||||
className={this.props.valueToUseInitially}
|
||||
ref="theSimpleComponent"
|
||||
/>
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -429,12 +429,7 @@ describe('ReactComponentLifeCycle', function() {
|
||||
function() {
|
||||
var PropsToUpdate = React.createClass({
|
||||
render: function() {
|
||||
return (
|
||||
<input
|
||||
value={this.props.value}
|
||||
ref="theSimpleComponent">
|
||||
</input>
|
||||
);
|
||||
return <div className={this.props.value} ref="theSimpleComponent" />;
|
||||
}
|
||||
});
|
||||
var instance = <PropsToUpdate value="hello" />;
|
||||
|
||||
Reference in New Issue
Block a user