Description
Travels is a fast, framework-agnostic undo and redo library built on Mutative JSON Patch. It is designed for patch-based history that stays efficient with large state, small updates, long histories and persistence. Traditional undo systems copy the whole state object for every change. Travels stores only the differences between states as JSON Patches following RFC 6902, so a history of many small edits takes far less memory. The README gives an example: a 1MB state with 100 small edits could copy about 100MB under a snapshot approach, but might need only a few kilobytes of patches. It works with React, Vue, Zustand or plain JavaScript, and it suits text editors, drawing apps, form builders and other interactive applications. The README is candid that snapshot-based stacks can be faster for small state, short histories and local-only undo, because they skip patch generation. Its documentation covers createTravels and restoreTravels, instance methods, a maxHistory option, a controlled journal for an external state owner, mutable and archive modes, saving history to storage, TypeScript support and custom extensions. The project is open source on GitHub under mutativejs.…
Highlights
- Patch-based undo and redo with JSON Patch (RFC 6902)
- Works with React, Vue, Zustand and vanilla JavaScript
- maxHistory option to cap history length
- Mutable and archive modes
- Saving history to storage
- TypeScript support
Ratings & Reviews
No ratings yet
Be the first to rate Travels.
People also visit
Travels FAQ
What is Travels?
A framework-agnostic undo and redo library that stores patches instead of full state copies.
Why patches instead of snapshots?
The README says snapshot-based undo clones the whole state for each change, while Travels stores only the differences, which keeps history small for large states.
Is it always faster?
No. The README says snapshot stacks can be faster for small state, short history and local-only undo, because they skip patch generation.
Which frameworks does it work with?
React, Vue, Zustand or plain JavaScript.
Can history be saved?
Yes. The README has a section on saving history to storage.
What are the best Travels alternatives?
Popular alternatives to Travels include Git Branchless, Shiki and Revu. See all Travels alternatives








