[ReactNative] s/render*View/render/ in <WebView>

This commit is contained in:
Christopher Chedeau 2015-03-18 16:14:01 -07:00
parent afb71ae1c3
commit 4b42f8c9e9
3 changed files with 12 additions and 12 deletions

View File

@ -81,8 +81,8 @@ var WebViewExample = React.createClass({
automaticallyAdjustContentInsets={false}
style={styles.webView}
url={this.state.url}
renderErrorView={this.renderErrorView}
renderLoadingView={this.renderLoadingView}
renderError={this.renderError}
renderLoading={this.renderLoading}
onNavigationStateChange={this.onNavigationStateChange}
startInLoadingState={true}
/>
@ -115,7 +115,7 @@ var WebViewExample = React.createClass({
});
},
renderErrorView: function(errorDomain, errorCode, errorDesc) {
renderError: function(errorDomain, errorCode, errorDesc) {
return (
<View style={styles.errorContainer}>
<Text style={styles.errorTextTitle}>
@ -134,7 +134,7 @@ var WebViewExample = React.createClass({
);
},
renderLoadingView: function() {
renderLoading: function() {
return (
<View style={styles.loadingView}>
<ActivityIndicatorIOS />

View File

@ -29,8 +29,8 @@ var WebViewState = keyMirror({
var WebView = React.createClass({
propTypes: {
renderErrorView: PropTypes.func.isRequired, // view to show if there's an error
renderLoadingView: PropTypes.func.isRequired, // loading indicator to show
renderError: PropTypes.func.isRequired, // view to show if there's an error
renderLoading: PropTypes.func.isRequired, // loading indicator to show
url: PropTypes.string.isRequired,
automaticallyAdjustContentInsets: PropTypes.bool,
contentInset: EdgeInsetsPropType,
@ -61,10 +61,10 @@ var WebView = React.createClass({
var otherView = null;
if (this.state.viewState === WebViewState.LOADING) {
otherView = this.props.renderLoadingView();
otherView = this.props.renderLoading();
} else if (this.state.viewState === WebViewState.ERROR) {
var errorEvent = this.state.lastErrorEvent;
otherView = this.props.renderErrorView(
otherView = this.props.renderError(
errorEvent.domain,
errorEvent.code,
errorEvent.description);

View File

@ -42,8 +42,8 @@ var WebView = React.createClass({
},
propTypes: {
renderErrorView: PropTypes.func.isRequired, // view to show if there's an error
renderLoadingView: PropTypes.func.isRequired, // loading indicator to show
renderError: PropTypes.func.isRequired, // view to show if there's an error
renderLoading: PropTypes.func.isRequired, // loading indicator to show
url: PropTypes.string.isRequired,
automaticallyAdjustContentInsets: PropTypes.bool,
shouldInjectAJAXHandler: PropTypes.bool,
@ -71,10 +71,10 @@ var WebView = React.createClass({
var otherView = null;
if (this.state.viewState === WebViewState.LOADING) {
otherView = this.props.renderLoadingView();
otherView = this.props.renderLoading();
} else if (this.state.viewState === WebViewState.ERROR) {
var errorEvent = this.state.lastErrorEvent;
otherView = this.props.renderErrorView(
otherView = this.props.renderError(
errorEvent.domain,
errorEvent.code,
errorEvent.description);