arrow_backBACK TO DRILLS
White Beltstate-basicsPREMIUM
Choosing Between useState And A Local Variable
A button click handler asks the user for their name using prompt() and immediately shows an alert greeting them. Which approach is more appropriate for storing the name?