[Feature request] Add option for persistent state
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- typescript
- 领域
- frontend
调研方向
没有指定文件或测试。首先明确持久化应属于核心库还是插件,支持哪些存储目标和序列化/API,然后定义测试,覆盖应用启动时的状态恢复,以及不因输入而产生反复变动的更新。
由索引模型根据 Issue 内容生成。
描述
Describe the Feature request
It would be great if TanStack store got an option to persistent state between application boots. This takes away the hassle of saving all data that needs to be persistent, to the store but also to disk. I know this pattern from Vuex and later Pinia, but now being in a situation where I'm unable to use my favorite JS framework, I am able to use introduce new things like state management (new to on of the projects i'm currently working on). I would like doing this with a state management tool that has an API that I like, and I also value the ability to use it cross framework as well. But currently, I'm missing the option to make the state persistent in TanStack Store. I can get close by using signals like effects, pseudocode:
effect()=>(
store.setItem('var1', var1);
)
I use a similar pattern to retrieve state at app boot. But this is of course far from optimal and would for example cause issues if put on an input component directly, then you'd have to debounce the effect or something. In short; it would probably be better if implemented in the library (or as a plugin) so that users needing persistency don't have to re-invent the wheel or implement sub-optimal solutions.
- 主要语言
- TypeScript
- 星标
- 913
- 派生
- 121
- 平均合并
- 19 小时 51 分钟
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/store 的其他 Issue
-
svelte-store: extensionless re-exports in src/index.svelte.ts break Node ESM and nodenext types可能已有人在做 @Mittalnew 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 86/100
维护者通常 1 天内回复
-
`useSelector` triggers `state_proxy_equality_mismatch` on every store update in svelte-store可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
TanStack/store#322 · 3 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
Missing atom docs可能已有人在做 @looooown2006 于 196 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
compareDeep reports unequal Sets as equal可能已有人在做 @Gourav224 于 28 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 30/100
维护者通常 1 天内回复
-
Reading a computed atom without subscribing can prevent garbage collection可能已有人在做 @Sheraff 于 52 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 58/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
fb55/htmlparser2#2579 ·
维护者通常 1 天内回复
-
bug good first issue needs-review
难度 1/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
documentation public
难度 1/5 1-3 小时 新手友好度 68/100
midnightntwrk/umbradb#65 ·
维护者通常 2 天内回复
-
area/channels kind/bug priority/medium
难度 2/5 1-3 小时 新手友好度 78/100
nanocoai/nanoclaw#4501 · 1 条评论 ·
维护者通常 1 天内回复
-
needs verification
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 13 天内回复