Skip to content

v1.2.0 - Pausing history

Compare
Choose a tag to compare
@EskiMojo14 EskiMojo14 released this 20 Apr 23:31
· 97 commits to main since this release

This minor release:

  • adds the ability to pause history being recorded
  • switches default createSelector instance to createDraftSafeSelector

Pausing history

The history state shape now has a paused property which indicates whether changes should be recorded or not. It does not prevent state from being updated, it just prevents those updates from being recorded into history. As a result they cannot be undone or redone.

Use adapter.pause(state) to set the paused property to true, and adapter.resume(state) to set it back to false.