first commit

This commit is contained in:
2018-11-29 17:35:49 +08:00
commit 379d337dde
23 changed files with 777 additions and 0 deletions

24
src/actions/counter.js Normal file
View File

@@ -0,0 +1,24 @@
import {
ADD,
MINUS
} from '../constants/counter'
export const add = () => {
return {
type: ADD
}
}
export const minus = () => {
return {
type: MINUS
}
}
// 异步的action
export function asyncAdd () {
return dispatch => {
setTimeout(() => {
dispatch(add())
}, 2000)
}
}