Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/react-guide/redux-tutorial-cn
/ setNameActionCreator
Function
setNameActionCreator
06_dispatch-action.js:74–79 ·
view source on GitHub ↗
(name)
Source
from the content-addressed store, hash-verified
72
// 即以 flux 理论去做吧。让我们使用这个 action creator 发送一个我们想要的 action:
73
74
var
setNameActionCreator =
function
(name) {
75
return
{
76
type
:
'SET_NAME'
,
77
name: name
78
}
79
}
80
81
store_0.dispatch(setNameActionCreator(
'bob'
))
82
// 输出:
Callers
1
06_dispatch-action.js
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected