We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I love the alien names and stats, slimeFactor is particularly funny. It's all very neatly component-ised and you use props/state etc very well!
Some things about the UI that I'm sure you're aware of:
Some questions:
if(winner) { return ( <p>Player 1 crushes the competition!</p> ) } if(!winner) { return ( <p>Defeated by player 2!</p> ) }
this
if (winner) return <p>Player 1 crushes the competition!</p>; return <p>Defeated by player 2!</p>;
const [showWinMsg, setShowWinMsg] = useState(false); const [winner, setWinner] = useState(true);
The text was updated successfully, but these errors were encountered:
Hey team,
Piggy backing off what Taha said about condensing your if statement down into the following code:
You could simplyfy it further and just use a ternary operator, like this:
return ( winner ? <p>Player 1 crushes the competition!</p> : <p>Defeated by player 2!</p> );
Sorry, something went wrong.
No branches or pull requests
I love the alien names and stats, slimeFactor is particularly funny. It's all very neatly component-ised and you use props/state etc very well!
Some things about the UI that I'm sure you're aware of:
Some questions:
For example:
instead of this
this
For example:
The text was updated successfully, but these errors were encountered: