Re:Trello clone with Phoenix and React – 5-part tutorial
by hakanderyal on Saturday January 23, 2016 @09:38AM
(#10958500)
Yes, I'm using Redux, and never modify the state. But I also needed to rollback only the rejected action, and keep the rest of the actions that user did after the rejected action intact. That presented a whole lot of different edge cases.
I created a solution based on redux-optimist[1], modified to my apps specific needs.
I'm sure you figured this out, but having an immutable data structure at the root of your React application is great for rollbacks. And then maintain an array with a reference to the various data structures, however deep you need (within reason), and pop or push them as needed to rollback/roll forward.