import { Component } from 'react'; const blinkTimer = null; const toggleTimeout = function() { //var hidden = this.state.hidden; which was false //this.setState({ hidden: !hidden }); //blinkTimer = setTimeout(toggleTimeout.bind(this), 600); }; export default class NewGame extends Component { componentDidMount() { //toggleTimeout.call(this); }; componentWillUnmount() { clearTimeout(blinkTimer); }; render() { const classname = ['newgame']; //if (this.state.hidden === true) { // classname.push('hidden'); //} return (
Press Space Bar To Play
); }; };