-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(getState): add ability to find state
Currently, this lib expects the state to be at the key `toastr` (and even handles when the state object is an immutable object (via `state.get`). There is no way to define a custom / different location easily. This adds an optional prop to the `ReduxToastr` component which is a function that takes the current state to provide the toastr state.
- Loading branch information
1 parent
6e84797
commit 03419d4
Showing
3 changed files
with
5 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
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 technically became a breaking change since this default implementation doesn't match the existing implementation since it doesn't account for
state.get('toastr')
like it previously did.It requires anyone depending on
state.get('toastr')
to overridegetState
withstate => state.get('toastr')
.