title: React.js generate new random number
body: <p>I'm trying to create a new random number which will be set as state after a method. It works perfectly on refresh, but I can't 'generate' a new number after the button click. </p>
  
  <p>Here's my code at the moment:</p>
  
  <pre><code>var QuizContainer = React.createClass({
  
    randomNumber: function(){
      return Math.floor((Math.random() * Data.length) + 0);
    },
  
    getInitialState: function(){
      var rand = this.randomNumber();
      return {
        answerList: Data[rand].answer,
        answerQuestion: Data[rand].question,
        correctAnswer: Data[rand].correct,
        score: 0,
        timer: 30
      }
    }, 
  
    success: function(){
      this.setState({score: this.state.score + 1})
    },
  
    fail: function(){
      this.setState({score: 0})
      this.getInitialState();
    },
  
    handleClick: function(child){
      child.props.singleAnswer == this.state.correctAnswer ? this.success() : this.fail()
    },
  
    render: function(){
      return(
        &lt;div&gt;
          &lt;Timer timer={this.state.timer} /&gt;
          &lt;Score currentScore={this.state.score} /&gt;
          &lt;QuestionContainer answerQuestion={this.state.answerQuestion} /&gt;
          &lt;ButtonContainer onClick={this.handleClick} correctAnswer={this.state.correctAnswer} answerList={this.state.answerList} /&gt;
        &lt;/div&gt;
      )
    }
  
  })
  
  module.exports = QuizContainer;
  </code></pre>
  
  <p>If anyone's able to help I'd be very grateful! Thanks!</p>