problem
The page won’t render anymore after I added the new quote function. Can anyone tell my why my page won’t load?
repo
https://github.com/alkapwn3d/random_quote_generator
code
class QuoteBox extends React.Component {
constructor(){
super(props);
this.state = quotes;
}
newQuote = () => {
return console.log('ready'); // change this function
}
render(){
return (
<div id="quote-box">
<div id="text">{this.state.quotes.quote}</div>
<div id="author">{this.state.quotes.author}</div>
<button id="new-quote" onClick={(x) => this.newQuote(x)}>New Quote</button>
<button id="tweet-quote">Tweet</button>
</div>
);
}
}