Closed MillerGregor closed 7 years ago
It works, which is great, so it might be worth adding to the README:
A Duck's action creators can be normal plain objects or thunks (see: redux-thunk)
creators: (duck) => ({ logout: () => ({ type: duck.types.LOGOUT }), removeTokenAsync: () => { return dispatch => { return StorageAsync.removeItem(tokenKey) .then(() => (dispatch({ type: duck.types.REMOVE_TOKEN }))); } } })
Done! Sorry for the delay.
https://github.com/investtools/extensible-duck#defining-the-creators
It works, which is great, so it might be worth adding to the README:
A Duck's action creators can be normal plain objects or thunks (see: redux-thunk)