useTrackedEffect
追踪是哪个依赖发生变化。
代码演示
基础用法
API
useTrackedEffect(
effect: (changes: [], previousDeps: [], currentDeps: []) => (void | (() => void | undefined)),
deps?: deps,
)
useTrackedEffect(
effect: (changes: [], previousDeps: [], currentDeps: []) => (void | (() => void | undefined)),
deps?: deps,
)