This repository has been archived by the owner on Mar 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui: use redux-promise-middleware to request lists of entities
This dispatches the FETCH_ENTITIES action whose payload is an axios request object. redux-promise-middleware will handle this by executing the request's promise, and then magically dispatching FETCH_ENTITIES_{PENDING,FULFILLED,REJECTED} actions according to the 3 possible stages of the conversation with the API endpoint. Currently these 3 actions are not handled by any reducer; that will come in subsequent commits.
- Loading branch information
Showing
6 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
export const TOGGLE_ABOUT = "TOGGLE_ABOUT" | ||
|
||
export const ADD_ENTITY = "ADD_ENTITY" | ||
|
||
export const FETCH_ENTITIES = "FETCH_ENTITIES" | ||
export const FETCH_ENTITIES_PENDING = "FETCH_ENTITIES_PENDING" | ||
export const FETCH_ENTITIES_FULFILLED = "FETCH_ENTITIES_FULFILLED" | ||
export const FETCH_ENTITIES_REJECTED = "FETCH_ENTITIES_REJECTED" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters