-
Notifications
You must be signed in to change notification settings - Fork 10
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
Alternative API #26
Alternative API #26
Conversation
This is great! I need time to test it, but looks awesome! |
This would be great. Now it is not possible to use custom structure for the Redux state. |
@jsslai #42 introduced This should probably be mentioned in the documentation... I'll add it to my TODOs. |
@wacii Thanks! I’ll check that. |
Nice Work. Any time plans for the next release? :) |
Hey @wacii ! I tried merging this with the current develop branch, but I'm facing some issues with the changes introduced when we added immutable support.
So I'm wondering does this still make sense? If it does, I need some help on updating |
@sorodrigo It does still make sense. The main purpose of this was to give the user control over where the middleware was applied. I'd just leave the code as is. I'll work on this tonight. |
great and thanks! I also added a npm script for running the alternative API in the examples. As of now, because the package.json is pointing to npm this won't work out of the box, but if you want to test it just need to point it to your git branch. |
03a7c59
to
ef52804
Compare
Rebased against develop. I cherry-picked your addition. |
works like a charm! |
Currently, Redux Offline decides where to insert the offline middleware. This is unnecessary and can sometimes cause difficulties with other libraries, as in #16.
This PR introduces an alternative API, for when users need a bit more flexibility.
Other changes are possible. The reducer could be exposed instead of
enhanceReducer()
. And there is really no reason to set up Redux Persist for the user: it just forces them to use a particular version of the library. But I figured this is enough code to start a discussion.Not immediately important, but something to consider.