Right now the Winner and Loser are being determined by quite an ugly function inside app.js. It would be nicer to include a key value inside our state that holds a string value that isnull until there is a determined winner. I would advise using null for the initial value because it can be overwritten to a string and won't cause any spacing issues if you wanted to show the initial value on the page as empty.
Right now the Winner and Loser are being determined by quite an ugly function inside
app.js
. It would be nicer to include a key value inside ourstate
that holds a string value that isnull
until there is a determined winner. I would advise usingnull
for the initial value because it can be overwritten to a string and won't cause any spacing issues if you wanted to show the initial value on the page as empty.For reference - look at the Redux Blackjack lab: https://github.com/learn-co-curriculum/redux-blackjack/blob/solution/src/reducers/gameReducer.js