Replies: 6 comments
-
|
@NewByVector 大佬能麻烦看下这个问题吗 |
Beta Was this translation helpful? Give feedback.
-
|
因为你使用的是 |
Beta Was this translation helpful? Give feedback.
-
@NewByVector 我看代码 有 updateData 之前没发现 使用这个可以了, 但是 setData 支持 merge 我感觉 应该 也能 跟 updateData 一样 触发更新吧 |
Beta Was this translation helpful? Give feedback.
-
|
@JoeABCDEF 现在检测更新是根据对象引用判断的。不过这里确实要思考一下,对象改变检测机制。 |
Beta Was this translation helpful? Give feedback.
-
|
@NewByVector |
Beta Was this translation helpful? Give feedback.
-
|
我也遇到这个问题了, 更新数组的时候。 如果数组已有4个数据,当我setData数组为2个数据时,数据更新会失败。 临时方案是调用updateData函数或者setData(data, { deep: false }); |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
问题描述

注释掉的那三种 setData 的更新 都不能正常 被监听到 但是实际改变了重现链接
https://codesandbox.io/s/mo-ban-forked-kjqoh3?file=/src/App.tsx
重现步骤
https://codesandbox.io/s/mo-ban-forked-kjqoh3?file=/src/App.tsx
预期行为
只要改变就能监听到, 除非是 slient: true 监听不到
平台
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
Beta Was this translation helpful? Give feedback.
All reactions