Skip to content

Instantly share code, notes, and snippets.

@evanrs
Last active November 4, 2015 07:14
Show Gist options
  • Save evanrs/d6a45464ecfb524b2b84 to your computer and use it in GitHub Desktop.
Save evanrs/d6a45464ecfb524b2b84 to your computer and use it in GitHub Desktop.
Rewriting history with predicates (Reactive 2015 lightning talk proposal)

This is a proposal for a lightning talk I would give at the Reactive 2015 conference.

NOTE: If you like it, put a star ⭐ on it—the number of stars decides if it makes the cut!

Rewriting history with predicates

Redux provides a simple pattern for managing application state. As demonstrated in Dan Abramov's talk following this pattern lets you painlessly implement simple undo and time travel. By keeping a history of actions, and reducing a subset of those actions, you can travel to any point in the apps history.

I will demonstrate how you can easily rewrite this history with a set of reducing predicates. In five minutes I'll show how quickly complex undos can be written. I demo this in a Todo app with time travelling scrubbers that allow new actions in the past that do not overwrite those in the future. I will demo a drawing app with layers and implement erase using only predicates in that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment