3 ms·
Two things: - The data flow is predictable. Something wrong with a portion of the UI? Look at the render method. Something wrong with the data? Look at its
by acemarke 8y ago
Two things:
- The data flow is predictable. Something wrong with a portion of the UI? Look at the render method. Something wrong with the data? Look at its state, or follow the data flow back up the tree. Related to that, it mostly eliminates a lot of issues you'd see in jQuery-type apps, where you'd see logic like `if($someElement.is(":visible"))`, because you don't have to write the logic that handles all those transitions manually - you just specify what you want the UI to look like _now_, and React takes care of it for you.
- Yes, the React DevTools browser plugin is a huge benefit to debugging (and ditto for the Redux DevTools plugin, although that's for a separate library).
- peteforde 8y agoThanks! For what it's worth, I can definitely appreciate how stateful components can make implementing command pattern concepts a lot easier. One thing I really don't appreciate about the web is that we kind of forgot about Undo... much less Photoshop Undo.