|
|
|
|
|
by Sacho
3385 days ago
|
|
Have you thought about using MobX instead? I think Redux's "complications" stem from guiding you towards a certain set of principles and ways of coding without giving you the tools to commit to those principles and ways of coding. Particularly, the way you compose reducers and the way you expose actions is manual and very boilerplate-ish. Mark Erikson hosts a wonderful page full of redux ecosystem links, and here you can see all the tools to allow you to write and compose reducers - https://github.com/markerikson/redux-ecosystem-links/blob/ma... so clearly there was something missing there. Redux as an idea I found very simple yet interesting. Watching Dan Abramov's series on building a Redux-lite from scratch helped changed my way of approaching how I build web apps. However, using Redux in the mundane, daily sense was riddled with little practical niggles that were never really answered by the fairly minimalistic library, so I ended up with a kind of feeling that Redux kind of required me to "know" how to write good code before I commit to using it... Meanwhile MobX seems to map to my mental model and all the modes of "mutation" that I'm already used to and have experience in, while also essentially introducing the same ideas as Redux. |
|
Mobx also frees you from the "Redux architecture", which I found to be difficult and contrived...