Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/kenberkeley/react-demo
/ handleSubmit
Method
handleSubmit
src/components/Navbar/LoginForm.js:15–19 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
13
}
14
15
handleSubmit () {
16
let
username = this.state.username
17
if
(!username)
return
alert(
'用户名为空'
)
18
this.props.login({ username })
19
}
20
21
render () {
22
/* 由于 ES6 中 React 不会自动绑定this,直接 onSubmit={this.handleSubmit} 会报错
Callers
nothing calls this directly
Calls
1
login
Method · 0.80
Tested by
no test coverage detected