Comments (9)
Middleware:
- redux-thunk - documented
- redux-promise - documented
- redux-saga - compatability package
- redux-observable - compatability package
- redux-logic
- redux-axios-middleware
- redux-cycles
- redux-logger
- redux-immutable-state-invariant
- redux-unhandled-action
- redux-analytics
- redux-gen
- redux-action-tree
- apollo-client - removed redux support?
Enhancers
from redux-subspace.
Updated list with some enhancers as well after the redux-loop addition in #44
from redux-subspace.
Man, seeing redux-logic at the bottom of that list is painful. It's the one middleware to rule them all!
from redux-subspace.
The order of that list is not indicative of the order they will be looked at... But if it makes you feel better, I'll move it up the list ;)
FWIW, I planned to look at redux-cycles or redux-logic next.
from redux-subspace.
I don't want to bash other middlewares, but, having used several of them, I find redux-logic
to be a kind of meta-middleware that rolls the functionality of the different ones together into a really nice, seamless whole. I usually write my side-effects using async/await, and it supports that syntax right out of the box. But if I need more power, then I can switch over to rxjs syntax with no pain, while still getting many of the other perks that redux-logic
has to offer. I try to spread the word on it, simply because it deserves much more attention. And I'm stoked that it's on your short list!
from redux-subspace.
For me, there are pros and cons both ways. It great when something is really flexible and can be used how you want to use it, but it can sometimes become a jack-of-all-trade, master-of-none. Something that is super good at one thing is also great when you're doing that thing, but often falls down when you want to so something slightly left of normal. Of course, it's possible to balance the line between being flexible enough to cover a greater number of cases, without sacrificing features in what you can do, but very few actually pull this off well, or have a massive amount of effort go into maintaining that balance.
In my personal usage of Redux, I actually haven't come across many times that redux-thunk wasn't enough for what I was trying to accomplish.
I look forward to trying redux-logic based on your glowing review. Out of interest, have you tried redux-cycles yet? I've heard a lot of good things about it which is why it's so high on my list of middleware to look at.
from redux-subspace.
FYI @jcheroske, I've begun working (in my spare time, so don't get too excited on it being done soon) on a redux-logic wrapper and I have to admit, it's a pretty sweet middleware.
My only complaint (which would literally only be an issue for me) is that there isn't one single place the logic exposes the store (or it's functions), meaning I have to recreate the subspace multiple times (in validate
, in transform
and in process
every time the logic is triggered), so it may add some performance overhead, but in my testing it hasn't been too bad. I'm still coming to grips with how the logic objects work so I may yet find better way.
I do have a quick question on usage for you. According to the usage section of their docs, it seems as though logics are combined through standard array combination:
// in logic.js - combines logic from across many files, just
// a simple array of logic to be used for this app
export default [
...todoLogic,
...pollsLogic
];
// pollsLogic
export default [
validationLogic,
addUniqueId,
fetchPollsLogic
];
The common pattern with redux-subspace
is to wrap each layer with a subspaced
function, so which is preffered
// Option 1
export default [
...subspaced((state) => state.todos, 'todos')(todoLogic),
...subspaced((state) => state.polls, 'polls')(pollsLogic)
];
or
// Option 2
export default [
subspaced((state) => state.todos, 'todos')(todoLogic),
subspaced((state) => state.polls, 'polls')(pollsLogic)
];
Basically the only difference is where the spread operators go, but option 2 is probably going to be harder to implement (it will need to return a single logic that can run multiple logics).
With option 1, I think the basic logic (pun intended) would be if an array is provided, an array is returned, but if a single logic is provided a single logic is returned.
Any thoughts and feedback are welcome.
from redux-subspace.
The Redux Ecosystem docs have recently been updated (it include redux-subspace not to - YAY!) so I'll try to find some time soon to go through that and see if the list is still valid and add and/or remove any items that make sense to.
FYI, I started looking at redux-logic again recently and it's still giving me some grief. If anyone has experience with it, I'd love some input.
from redux-subspace.
I don't see us adding taking on any more official packages to support. I'm more than happy to consider any though, but I'm not going to keep track of them here anymore. Closing.
from redux-subspace.
Related Issues (20)
- @types in redux-subspace-observable dependencies HOT 1
- TypeError: undefined is not an object (evaluating 'store.subspaceOptions') HOT 4
- [redux-subspace] Thunk actions not namespaced HOT 11
- Any ideas on subspacing components with render props? HOT 7
- Removing Subspaced Reducer HOT 3
- TypeError: Object doesn't support property or method 'startsWith' [redux-subspace] HOT 1
- react-redux-subspace support react-redux 7 HOT 2
- [redux-subspace]Being in a subspace, can I dispatch an action to an other one ? HOT 3
- Ability to provide specific enhancer to a subspace HOT 19
- [redux-subspace-saga] Support redux-saga@^1.0.0 HOT 5
- Error on parentSpace HOT 2
- Basic subspace example incorrect in docs HOT 1
- Compatibility issue with react-redux v6 HOT 3
- [redux-subspace] In namespaced reducer, actions should be global by default HOT 1
- Cannot view updated parent space state when using useParentSpace() [react-redux-subspace] [redux-thunk] HOT 11
- Subspaced Saga - React to global action HOT 4
- react-redux-subspace npm audit denial-of-service vulnerability in recompose/node-fetch HOT 1
- Action Required: Fix Renovate Configuration
- Deprecated
- Using a prefilled state with namespaced reducers causes loss of the default store values. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redux-subspace.