mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-05-14 02:14:52 +08:00
28 lines
528 B
JavaScript
28 lines
528 B
JavaScript
"use strict";
|
|
|
|
import React from "react-native";
|
|
import CodePush from "react-native-code-push";
|
|
|
|
let {
|
|
AppRegistry,
|
|
Text,
|
|
View,
|
|
} = React;
|
|
|
|
let IsFailedUpdateTest = React.createClass({
|
|
componentDidMount() {
|
|
// Should trigger a rollback.
|
|
CodePush.restartApp();
|
|
},
|
|
render() {
|
|
return (
|
|
<View style={{backgroundColor: "white", padding: 40}}>
|
|
<Text>
|
|
Testing...
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
});
|
|
|
|
AppRegistry.registerComponent("IsFailedUpdateTest", () => IsFailedUpdateTest); |