Skip to content

Instantly share code, notes, and snippets.

@vzaidman
Created December 8, 2017 11:41
Show Gist options
  • Save vzaidman/c4ff12f1a5d5ceef59d730e5c3350efc to your computer and use it in GitHub Desktop.
Save vzaidman/c4ff12f1a5d5ceef59d730e5c3350efc to your computer and use it in GitHub Desktop.
export const fetchTodos = makeThunkAsyncActionCreator('FETCH_TODOS', filter => fetchTodosFromServer(filter))
// fetchTodos.TYPE === 'FETCH_TODOS@ASYNC_REQUEST'
import {fetchTodos} from './actions'
return function(state, action){
switch(action.type){
...
case fetchTodos.TYPE:
...
return ...
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment