fix: 配置组件没有正确同步状态

* 问题出在我应该根据 State 决定组件状态而不是组件状态决定 State
* 踩坑了, 浪费我时间, 唉
This commit is contained in:
CrescentLeaf
2025-10-08 12:24:33 +08:00
parent 38c28c3fb6
commit db43de19c4
5 changed files with 44 additions and 36 deletions

View File

@@ -0,0 +1,6 @@
import React from 'react'
// deno-lint-ignore no-explicit-any
const PreferenceUpdater = React.createContext<(key: string, value: unknown) => void>(null as any)
export default PreferenceUpdater