require('../../sass/board/scorebar.scss'); import { Component } from 'react'; export default class Scorebar extends Component { // getInitialState() { // return { // currentScore: 0, // highScore: 0, // lives: 3 // }; // }, componentDidMount() { // // State.subscribe('munch/successful', this.updateScore); // State.subscribe('munch/failed', this.updateLives); }; updateScore() { // var score = this.state.currentScore; // this.setState({ currentScore: score + 10 }); }; updateLives() { // var lives = this.state.lives; // this.setState({ lives: lives - 1 }); }; render() { var lives = []; for (var i = 0; i < 3; i++) { lives.push(
); } return (
0
0
{lives}
); }; };