-
Notifications
You must be signed in to change notification settings - Fork 33
add defaultState from the original reducers to the namespaced ones #100
add defaultState from the original reducers to the namespaced ones #100
Conversation
d8ef2e6
to
e0b86c6
Compare
e0b86c6
to
2f9afe6
Compare
|
||
const reduxSpecific = (action) => action.type.startsWith(REDUX_PREFIX) | ||
|
||
export default reduxSpecific |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add correct file ending
@@ -0,0 +1,13 @@ | |||
/** | |||
* Copyright 2017, IOOF Holdings Limited. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Copyright 2017, IOOF Holdings Limited. | |
* Copyright 2018, IOOF Holdings Limited. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github wont let me commit this (no permission to push the change, presumable to your fork), but yes.
|
||
const processAction = (namespace) => (action, callback, defaultValue) => { | ||
if (!namespace || isGlobal(action)) { | ||
if (!namespace || isGlobal(action) || isReduxSpecific(action)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be tempted to move this into the isGlobal
check. Essentially we are saying that redux actions are always global actions.
|
||
const processAction = (namespace) => (action, callback, defaultValue) => { | ||
if (!namespace || isGlobal(action)) { | ||
if (!namespace || isGlobal(action) || isReduxSpecific(action)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case should get a specific unit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add tests a bit later
Oh, I forgot to do the usual preamble... Thanks for taking the time to improve |
Thanks for this. I'll put together a release later today. |
Sorry for the mess in commits :)