Play Again Panel

Let's design the “Play Again” panel of the game in this lesson.

We'll cover the following

PlayAgainPanel

The PlayAgainPanel is similar. It combines the controlled element for the language selection, a wrapped “Play Again” button that sends the language choice, and an unwrapped “Quit” button. The clickPlayAgain must be wrapped because a click callback function is sent to the event object for the click by default. Since clickPlayAgain requires a language to be specified, it must be “wrapped into” the call. On the other hand, the clickQuit function requires no arguments, which is why it’s not useful to wrap its call within another function.

Get hands-on with 1400+ tech skills courses.