i don’t understand step 7, it says:
"On lines 14 through 21, you can see a method named .authorize()
.
This method will check whether a submitted password is equal to ‘swordfish’. If it is, then this.state.authorized
will become true
.
You need authorize
to get called whenever a user hits “Submit!”
Give the <form></form>
an onSubmit
attribute. Set the attribute’s value equal to the authorize
function."
It gives me this code (
<form action="#" onSubmit={this.authorize}>
) as a hint but I don’t know where to put it.
Can anyone help?