How to solve the handleSubmit' is not defined problem in react

when Xiaobai learns that react, uses ant design"s Form component template to write a login page, what should be done with the appearance of line10-"handleSubmit" is not defined?

clipboard.png

May.22,2021

onSubmit= {this.handleSubmit.bind (this)} , please refer to the document how-do-i-bind-a-function-to-a-component-instance


because your this points to window, you need to fix it back to the current class instance.

Arrow function is OK, bind can

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b40ae5-2c53c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b40ae5-2c53c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?