4 ms·
I don't use Redux, but I presumed that the events were stored by default, and state was rebuilt from them during 'time travel' debugging. In a production enviro
by dismantlethesun 9y ago
I don't use Redux, but I presumed that the events were stored by default, and state was rebuilt from them during 'time travel' debugging. In a production environment, rebuilding from the stored events is less necessary, and only specialised applications such as rich text editors (e.g. really use it).
- leshow 9y agoEvents aren't stored by default. You can store them, and it sure makes creating those types of applications easier, but that's more because you've bought at least partially into referential transparency and pure functions in your reducers. More apps than the ones you mentioned benefit from this though, any undo or revert operation in an applications is leagues easier in the sort of FRP design of redux.
- acemarke 9y agoRedux's core doesn't store any events or prior state by default. It just does: currentState = rootReducer(currentState, action); Time travel debugging is implemented as a store enhancer, which does indeed save the action history and replay it to generate the correct state as you jump between specific points in the history log. There's also many addons and additional use cases that can make use of recording actions as they occur, such as logging a user's session for later playback / debugging as part of a crash report, or implementing undo/redo functionality.