MCPcopy
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
74var setNameActionCreator = function (name) {
75 return {
76 type: 'SET_NAME',
77 name: name
78 }
79}
80
81store_0.dispatch(setNameActionCreator('bob'))
82// 输出:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected