let
and const
<button>
.onClick={handleClick}
, not onClick={handleClick()}
.e.stopPropataion()
on the first argument to prevent that.e.preventDefault()
to prevent that.useState
HookuseState
Hook returnsuseState
useState
Hook.use
. They let you "hook into" React features like state.useState
is only valid at the top level of a component or another Hook.useState
Hook returns a pair of values: the current state and the function to update it.