Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make Result into functional component #12

Open
eadehemingway opened this issue Aug 22, 2019 · 0 comments
Open

make Result into functional component #12

eadehemingway opened this issue Aug 22, 2019 · 0 comments

Comments

@eadehemingway
Copy link
Contributor

class Result extends Component {
render() {
return (
<div>
{this.props.score === 10 ? <h1>You Win!</h1> : <h1>You Lose</h1>}
<p>{this.props.score}</p>
</div>
);
}
}

this component doesnt use state or have any methods so it should be a functional component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant