Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

svelte-undo

> 编程语言
Open source

A small utility for managing an undo stack

198 stars0 likes4 views
WebsiteGitHub

About

A small utility for managing an undo stack

svelte-undo

A small utility for managing an undo stack, that you can subscribe to in your Svelte applications (or indeed anywhere else).

Demo here.

Usage

…

In a Svelte component, you can reference first and last as store properties without manually subscribing:

svelte
 value = stack.undo()}>Undo
 value = stack.redo()}>Redo

You can also access the current value of the stack, if that's preferable to tracking the value manually:

svelte

The answer is {$stack.current.answer}

Don't mutate the objects you push to the undo stack; chaos will result. Instead, create a fresh copy each time, either manually or using something like Immer.

License

MIT

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言