-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability for slices to listen to other actions (#83)
* Add `type` field to action creators * Update createSlice to handle other actions * Fill out createSlice docs * Formatting * Hacky attempt to fix createAction type tests * Fix example typo * Alternate: Add ability for slices to listen to other actions (#86) Implemented my proposed changes from #83 (comment) @denisw @markerikson your inputs are appreciated *Note: this PR is for the `feature/other-slice-action` branch not `master`* * ~~Removed `getType()` utility~~ * ~~`slice` is no longer attached to `actionsMap` and `reducerMap`~~ * ~~Removed `reducerMap` and directly forward `reducers` to `createReducer`~~ - [x] `createAction()` action creators `type` property returns a `string literal` for better type saftey - [x] Fixed tests - [x] Added tests * Play with type tests a bit
- Loading branch information
1 parent
5b38860
commit affc5d7
Showing
10 changed files
with
156 additions
and
77 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
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
Oops, something went wrong.