TheNickyYo
TheNickyYo

Reputation: 2389

Redux, rollback state to a specific point

I've been looking through the documentation but cannot find any references to this.. Does Redux by default have built in functionality that allows us to reference the current version of state and roll back to that reference down the line?

Upvotes: 0

Views: 440

Answers (3)

markerikson
markerikson

Reputation: 67547

No. Redux has very minimal built-in functionality, but was designed to be extended for use cases like undo/redo. There are numerous existing libraries specifically for undo/redo, and I would guess that some of those would be useful for your situation.

Upvotes: 1

Artem Kolodko
Artem Kolodko

Reputation: 409

Redux is not a framework with lot of popular cases and solutions, it is state container with simple concepts. According to redux documentation, you should implement undo/redo functionality in your program manually with list of past, present and future stack.

Upvotes: 0

TheNickyYo
TheNickyYo

Reputation: 2389

Just looked through the source code and the only available methods are:

  • dispatch
  • subscribe
  • getState
  • replaceReducer
  • [$$observable]: observable

So I guess it's not possible... Shame..

Upvotes: 0

Related Questions