Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 6c1487c

Browse files
author
Will Anderson
committed
Update example app script code
1 parent 6b7b311 commit 6c1487c

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

Examples/CodePushDemoApp/index.ios.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ var Button = require("react-native-button");
1818
var CodePush = require('react-native-code-push');
1919

2020
var CodePushDemoApp = React.createClass({
21+
22+
getInitialState: function() {
23+
return {};
24+
},
2125
componentDidMount: function() {
2226
this.checkUpdate();
2327
},
@@ -32,9 +36,10 @@ var CodePushDemoApp = React.createClass({
3236
},
3337
handlePress: function() {
3438
this.state.update.download().done((localPackage) => {
35-
localPackage.apply(1000).done();
39+
localPackage.apply().done();
3640
});
3741
},
42+
3843
render: function() {
3944
var updateView;
4045
if (this.state.update) {
@@ -50,14 +55,7 @@ var CodePushDemoApp = React.createClass({
5055
return (
5156
<View style={styles.container}>
5257
<Text style={styles.welcome}>
53-
Welcome to React Native!
54-
</Text>
55-
<Text style={styles.instructions}>
56-
To get started, edit index.ios.js
57-
</Text>
58-
<Text style={styles.instructions}>
59-
Press Cmd+R to reload,{'\n'}
60-
Cmd+D or shake for dev menu
58+
Welcome to Code Push!
6159
</Text>
6260
{updateView}
6361
</View>

0 commit comments

Comments
 (0)