如何从 React-east-state 中的 autoEffect 中排除商店元素?

问题描述

由于 React-easy-state 使用 autoEffect 来创建响应式函数,我想知道是否有办法排除 autoEffect 中包含的 store 元素之一:

autoEffect(() => store.title === true && (store.name = 'test'))

在上述示例中,对 store.name 的任何更改也会触发 autoEffect。我正在寻找一种方法让这个反应性函数仅在更改为 store.title 而不是 store.name

时运行

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)