import React from "react";
import {
Text,
View,
} from 'react-native';
import styles from "../styles";
class Blink extends React.Component {
constructor(props) {
super(props);
this.state = { isShowingText: true };
setInterval(() => {
this.setState(previousState => ({
isShowingText: !previousState.isShowingText,
}));
}, 1000);
}
render() {
const display = this.state.isShowingText
? this.props.text
: ' ';
return (
{display}
);
}
}
export default class BlinkApp extends React.Component {
render() {
return (
);
}
}