-
Notifications
You must be signed in to change notification settings - Fork 997
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
Fixes #21137 - Register reducers from plugins #4925
Conversation
Issues: #21137 |
storage, | ||
powerStatus | ||
}); | ||
} |
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.
Missing semicolon semi
/cc @waldenraines |
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.
@xprazak2 thanks, this looks good to me and worked for my test of creating a simple store. Was easy to use, nice approach.
Indeed it does look nice, two concerns I have are:
Maybe we should consider sending a pr for those as it's indeed a nice solution |
I rebased, regarding the concerns:
|
Any work on this recently? Seems like the builds have become more stable. Probably worth rebasing and testing again. We're going to need this feature is Katello asap. |
What makes you say that? I briefly perused the repo and didn't see anything about it being abandoned. |
Current status: I rebased, but I expect tests using snapshots to fail. I submitted a patch to redux-injector 21 days ago that should take care of it, but my PR is without a response from maintainer. I did not see any mentions that the repo is abandoned/deprecated either, the oldest PR has been opened since February without any comments from maintainer. Possible ways to move this forward:
|
I vote for 2, it seems the project does not move anywhere since last release in 7 Nov 2016. I suppose we could call it tfm-redux-injector. It does not specify license :-/ |
IMO there is so little code it's worth just pulling into our code base. I have an example that doesn't manipulate the store (or snapshots) and allows registering reducers async. If we did use this approach here's a gist of what the plugin implementation would look like https://gist.github.com/danseethaler/d745921bebbe5f696c4a316e38d8879f I'm certainly up for whatever works and is simplest while also hoping to get something merged soon. |
Just to clarify, I'm suggesting that we don't use I think this is the simplest approach and I don't see any downsides but I'm certainly open to other ideas and/or concerns. |
The whole #5014 is the minimal working solution, so if @danseethaler is willing to reopen, we can get it in and move from there. |
Closing in favour of #5014 |
This allows us to register reducers from plugins and hook into different levels of our state tree.
State tree should be just a simple object (with uncombined reducers in leaves) if we want the states to be extensible. Using
combineReducers
will work as usual, but no one will be able to hook into the states that were combined manually.