3 ms·
Instead of creating another level of abstraction that a dev has to learn, how about just creating smart IDE tools that help with Redux? E.g. noticing that you'r
by jdpigeon 9y ago
Instead of creating another level of abstraction that a dev has to learn, how about just creating smart IDE tools that help with Redux? E.g. noticing that you're creating another action and automatically creating a statement in the reducer
- bloomca 9y agoWell, there are several problems here. While you are correct, that we don't really have tools which will automatically create constants or generate a reducer based on them, I personally don't think that it is a right direction. First of all, there are too many tools around. So, unless it will be really popular, it will be achievable only in couple of most-popuplar editors. Secondly, there are some things which this approach won't solve -- for instance, universal approach to caching and merging data in reducer (it can be done via some helper functions, but you still will have a lot of boilerplate). And also, some things are just hard to do -- for instance, combining reducers with decent amount of granularity and complexity of maintaining it later. Also, here I provide a way to do prefetching for server-side rendering, which is another problem you'd have to solve.