-
-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
redux @@redux/INIT actions #4
Comments
@SebastienDaniel Handling the |
I guess I didn't express myself properly :o I'm not saying we should handle or react to those actions in anyway whatsoever, I'm saying those actions should pass any controls set by redux-ignore. In other words, they shouldn't ever be ignored. Or is that still an anti-pattern? |
@SebastienDaniel It's an anti-pattern to treat What's the issue you're having? |
The code is working fine. Its mostly a boilerplate issue, so nothing critical. I felt that having to account for Here is what my root reducer looks like when using redux-ignore. combineReducers({
apis: ignore.ignoreActions(
require("./apis"),
function(action) {
return /^ACTIVATE_|^FILTER_|^SORT_|^WAITING_FOR$|^TRIGGER_$|^ADD_$/g.test(action.type);
}
),
session: ignore.filterActions(
require("./session"),
function(action) {
return /@@redux|_SESSION$/g.test(action.type);
}
),
components: require("./components"),
shell: ignore.filterActions(
require("./shell"),
function(action) {
return /@@redux|^ACTIVATE_|^TRIGGER_|^ADD_/g.test(action.type);
}
)
}); Notice that I NEED to account for Maybe there's something I'm not understanding or a piece of information I'm missing. You seem to be saying that I'm not understanding the issue (all the better if I can learn from this!) thx for your patience :) |
@SebastienDaniel ah, I understand your issue now, but unfortunately this isn't an easy fix. I can think of two solutions to this:
In both solutions, we are introducing lots of magic and causing more bugs than we are fixing. I'll reopen this and add a EDIT: Actually, there is another solution: Just use |
I've just added redux-ignore to my project and instantly got mentioned error:
|
I'm having the same error as liesislukas, would that be related to this issue? |
this should be fixed in 1.2.4 (thanks @maxmechanic!) - please let me know if there are any more issues 😁 |
It's kind of counter-intuitive to have to manually add
@@redux/INIT
tests that pass when filtering actions, since this is an extension of redux default behaviour.Shouldn't those actions be handled by default by this module?
The text was updated successfully, but these errors were encountered: