DEV Community

Discussion on: React Hook to Allow Undo/Redo

Collapse
 
jeremyling profile image
Jeremy

Yes I use this in production for a drag and drop form builder to store the historical state of the form for undo/redo purposes. The form in this case is typically a deeply nested object storing serializable and non-serializable (Dates, functions, blobs, files, HTML elements) types.

I'm sure there are many implementations for undo/redo functionality. As the saying goes, there's a hook for everything. If there are further requirements you need (maybe diffing), you can extend this or search for other solutions.