5 ms·
Nope. plenty do. I do. granted its verbose, but it gets the job done nicely. easy to follow, plain functions all the way down.
by HyperMassive 8y ago
Nope. plenty do. I do.
granted its verbose, but it gets the job done nicely.
easy to follow, plain functions all the way down.
- molszanski 8y agoAnd what about those `reselect` wires? And that `connect` and `mapStoP / mapDtoP` stuff? Doesn't that "bother" you? Or you just mentally "pack" it into the verbosity basket and ignore it?
- WorldMaker 8y ago`reselect` is an option that you don't have to use. The mapStoP and mapDtoP are just plain functions that do what they say on the tin. Easy to read/write once you understand the pattern. The connect HOC like all HOCs is a bit of a smell, but easy enough to use without understanding much about HOCs. Likely soon hook replacements for connect will make all that "verbosity" even simpler and easier to work with. For instance, useMapState and useActionCreators from this proposal for redux hooks: https://github.com/epeli/redux-hooks https://github.com/epeli/redux-hooks
- molszanski 8y ago> `reselect` is an option that you don't have to use. Of course. It just happens that for my real life needs I've needed state that was derived from redux state: filtering, selections, pagination, normalizing / denormalizing state, relations between entities (classic library data model problem) etc. So I kinda can't "imagine" any "serious" work with redux without helpers like reselect etc. > Easy to read/write once you understand the pattern. Sure, there is nothing "complex" about any of that. And I am genuinely asking how people deal with that. It is just way too verbose for me. So I am wondering, how other people approach it. Close their eyes and plow through? Don't really care?
- totololo 8y agoGenuinely asked: is there a viable alternative? If so, what is it?
- molszanski 8y agoIMO mobx and mobx-react-lite (hooks) are brutally (!) effective to manage any globalish state.