diff --git a/App.js b/App.js
index 8d6286c..734cc4b 100644
--- a/App.js
+++ b/App.js
@@ -1,23 +1,35 @@
-import React from 'react';
-import { StyleSheet, Text, View } from 'react-native';
+import React, { Component } from 'react';
+import { AppRegistry, Text, View } from 'react-native';
-export default class App extends React.Component {
+class Blink extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {isShowingText: true};
+
+ setInterval(() => {
+ this.setState(previousState => {
+ return { isShowingText: !previousState.isShowingText };
+ });
+ }, 1000);
+ }
+
+ render() {
+ let display = this.state.isShowingText ? this.props.text : ' ';
+ return (
+ {display}
+ );
+ }
+}
+export default class BlinkApp extends Component {
render() {
return (
-
- Open up App.js to start working on your app!
- Changes you make will automatically reload.
- Shake your phone to open the developer menu.
+
+
+
+
);
}
}
-const styles = StyleSheet.create({
- container: {
- flex: 1,
- backgroundColor: '#fff',
- alignItems: 'center',
- justifyContent: 'center',
- },
-});
+AppRegistry.registerComponent('react-native-turorial', () => BlinkApp);