Skip to content

Commit 993e552

Browse files
committed
Fix example app launch error
1 parent 578943b commit 993e552

File tree

1 file changed

+20
-16
lines changed

1 file changed

+20
-16
lines changed

example/index.js

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,24 @@
88
* @flow
99
*/
1010

11-
'use strict';
11+
"use strict";
1212

13-
const React = require('react');
14-
const ReactNative = require('react-native');
15-
const {ProgressViewIOS, StyleSheet, View} = ReactNative;
13+
import { name as appName } from "./app.json";
14+
15+
const React = require("react");
16+
const ReactNative = require("react-native");
17+
const { AppRegistry, ProgressViewIOS, StyleSheet, View } = ReactNative;
1618

1719
type Props = {||};
1820
type State = {|
19-
progress: number,
21+
progress: number
2022
|};
2123

2224
class ProgressViewExample extends React.Component<Props, State> {
2325
_rafId: ?AnimationFrameID = null;
2426

2527
state = {
26-
progress: 0,
28+
progress: 0
2729
};
2830

2931
componentDidMount() {
@@ -38,7 +40,7 @@ class ProgressViewExample extends React.Component<Props, State> {
3840

3941
updateProgress = () => {
4042
const progress = this.state.progress + 0.01;
41-
this.setState({progress});
43+
this.setState({ progress });
4244
this._rafId = requestAnimationFrame(() => this.updateProgress());
4345
};
4446

@@ -85,22 +87,24 @@ class ProgressViewExample extends React.Component<Props, State> {
8587
const styles = StyleSheet.create({
8688
container: {
8789
marginTop: -20,
88-
backgroundColor: 'transparent',
90+
backgroundColor: "transparent"
8991
},
9092
progressView: {
91-
marginTop: 20,
92-
},
93+
marginTop: 20
94+
}
9395
});
9496

9597
exports.displayName = (undefined: ?string);
96-
exports.framework = 'React';
97-
exports.title = 'ProgressViewIOS';
98-
exports.description = 'ProgressViewIOS';
98+
exports.framework = "React";
99+
exports.title = "ProgressViewIOS";
100+
exports.description = "ProgressViewIOS";
99101
exports.examples = [
100102
{
101-
title: 'ProgressViewIOS',
103+
title: "ProgressViewIOS",
102104
render() {
103105
return <ProgressViewExample />;
104-
},
105-
},
106+
}
107+
}
106108
];
109+
110+
AppRegistry.registerComponent(appName, () => ProgressViewExample);

0 commit comments

Comments
 (0)