4 ms·
> Redux developers seem to say their issue with prior frameworks was that it was difficult to understand where state changes came from. Prior to React/Redux we
by simon83 9y ago
> Redux developers seem to say their issue with prior frameworks was that it was difficult to understand where state changes came from.
Prior to React/Redux we used two-way data binding with first kendo then Knockout.js in a non trivial SPA. It was a nightmare to figure out where certain change events came from. It became a big ball of (un)observable spaghetti. Now you will tell me that our problem was that we let it come this far, and I totally agree with you, but the whole app was started years ago by inexperienced web developers (they were C/C++ devs), then it grew historically into an unmaintainable monster. This was long before I joined the company, and my team is now like the 4th generation working on and refactoring that code.
Redux makes it laughably easy to figure out where state changes come from. Not only that, but time travel debugging is a thing. For the parts that are mostly React/Redux, we made a little debug UI for QA so that they can serialize the last n states, send it to a database and automatically link it to issues. It's still more or less a proof of concept and not as useful as it could be, because not everything is stored in Redux yet, but it did show us that once we are where we want to be it will be an incredibly useful tool to reproduce bugs. Besides that writing unit tests for React/Redux is also easy, compared to other libs/frameworks.
May I ask with what kind of technologies you've been working with so far? Because reading your comments gives me the impression you live in a perfect world, with highly experienced and disciplined team mates, with no problems what so ever. If so congrats, you've won the lottery I guess.
- eropple 9y agoWhat Simon describes here is why stuff like event log datastores (Kafka, mostly) and CQRS-patterned systems are becoming so powerful, too. If you can just say here is every event that has gone through the system modeled as unambiguous transforms on immutable state, replaying--for both DR and debugging--is a trivial and super helpful exercise.