-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(redux): discovery-8 middleware, hooks, restructure (#82)
* helpers, aggregatedError func for redux hooks * redux actions, named exports * redux hooks, useReactRedux * redux middleware, middleware export, multi-actions * store, move middleware, named export
- Loading branch information
Showing
23 changed files
with
1,933 additions
and
50 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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { helpers } from './helpers'; | ||
|
||
export { helpers as default, helpers }; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import { factsTypes } from '../constants'; | ||
import factsService from '../../services/factsService'; | ||
import { factsService } from '../../services'; | ||
|
||
const addFacts = data => dispatch => | ||
dispatch({ | ||
type: factsTypes.ADD_FACTS, | ||
payload: factsService.addFacts(data) | ||
}); | ||
|
||
export { addFacts as default, addFacts }; | ||
const factsActions = { | ||
addFacts | ||
}; | ||
|
||
export { factsActions as default, factsActions, addFacts }; |
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
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,10 +1,12 @@ | ||
import { statusTypes } from '../constants'; | ||
import statusService from '../../services/statusService'; | ||
import { statusService } from '../../services'; | ||
|
||
const getStatus = () => dispatch => | ||
dispatch({ | ||
type: statusTypes.STATUS_INFO, | ||
payload: statusService.getStatus() | ||
}); | ||
|
||
export { getStatus as default, getStatus }; | ||
const statusActions = { getStatus }; | ||
|
||
export { statusActions as default, statusActions, getStatus }; |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { reduxHelpers } from './reduxHelpers'; | ||
|
||
export { reduxHelpers as default, reduxHelpers }; |
Oops, something went wrong.