-
Notifications
You must be signed in to change notification settings - Fork 24
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
[feature request] Global actions #41
Comments
I don't think a separate global package is necessary. If this were to be a thing, I think just having the right API in this library would be enough. |
I kinda like an idea of allowing user to dispatch global actions, it may seem like a hack, but it's not, because |
Where are we with this? I have a case where I have a wrapper
How would I dispatch an action for Right now, if I Is it possible somehow to solve this? Is it even possible? |
@dgsunesen, have you tried using a custom matcher? http://salsita.github.io/redux-elm/custom-matchers/writing-custom-matcher.html Using it, for example, you could listen to any event than ends with I'm not sure if this approach would cover every possible use case, but sometimes you can get away with it. |
@dvshur - Thanks. I'll let you know if this solves my problem :-) |
How would one solve this problem in Elm? Btw. I've found this project while trying to find an answer to my question about reusable components in Redux. I guess you are very qualified to answer it. |
I don't know if this library has an answer to that issue. There are many
libraries that attempt to bring elm-like composition to redux, and some do
address this. Check out redux-subspace for an example.
…On Sat, Jul 29, 2017 at 5:45 AM qbolec ***@***.***> wrote:
How would one solve this problem in Elm?
Btw. I've found this project while trying to find an answer to my question
<https://stackoverflow.com/questions/45368154/how-to-organize-redux-state-for-reusable-components>
about reusable components in Redux. I guess you are very qualified to
answer it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#41 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ADgUytGj3_qmdxqgsiet5SW6i9YJMjAhks5sSylfgaJpZM4JZe9D>
.
|
As described in #40 it will be nice to have an option of defining global actions. This is handy feature especially for integration with other react/redux libraries as they dispatch non-prefixed actions (e.g.
react-router-redux
).I think that there are two options of global actions handling:
redux-elm
feature, enabled with some configuration optionsredux-elm-global
, which is mounted at the root application updater like any other redux-elm componentI think I would prefer standalone package as it is more modular approach and global actions feature is definitely not required by all
redux-elm
users.I've created this issue to gather some opinions about this topic, so please write what do you think about it.
The text was updated successfully, but these errors were encountered: