Hello Codecademy Students,
My question is why in the Random.js file, in the render method, where we have this line,
<Button light={this.isLight()} onClick={this.handleClick} />
…isLight() has parentheses and handleClick() doesn’t? The methods are similar in format, except that isLight() has a return statement, but handleClick() doesn’t. Is that the reason?
I was hoping that Matt the developer from Ohio would cover this but he didn’t. Any ideas please? Thanks a lot.