tnfe / limu

High performance immutable lib alternative to immer with the same api, based on shallow copy on read and mark modified on write mechanism.
https://tnfe.github.io/limu
MIT License
220 stars 13 forks source link

limu的array.forEach方法貌似未生效???!! #2

Closed itmanyong closed 3 years ago

itmanyong commented 3 years ago

image

复现链接: https://codesandbox.io/s/lucid-water-nct7x

难道是因为limu外层引用未变,react的更新检查策略未到深层变化?

fantasticsoul commented 3 years ago

升级到 1.0.11, bug已fix,感谢关注

itmanyong commented 3 years ago

升级到1.0.11,bug已修复,感谢关注

不知道是不是写法的问题,sandbox中升级1.0.11后仍然未生效,甚至count的变化也不能触发被produce的数据更新视图

fantasticsoul commented 3 years ago

遗漏了一个场景已fix,更新到 1.0.12即可,同时推荐把代码改为如下格式,更方便测试

o.name = "王二麻子" + Date.now();

同时更新了测试用例 https://github.com/tnfe/limu/blob/main/test/array-other/object-item-3.ts

欢迎fork源码补充,更多测试用例

itmanyong commented 3 years ago

遗漏了一个场景已修复,更新到1.0.12目录,同时推荐把代码改为格式,更方便测试

哦。name  =  "王二麻子"  +  Date .现在( ) ;

同时更新了测试用例 https://github.com/tnfe/limu/blob/main/test/array-other/object-item-3.ts

欢迎fork源码,补充更多测试用例

主要是为了批量更新,感谢!早已fork

fantasticsoul commented 3 years ago

好的,😀

fantasticsoul commented 3 years ago

欢迎发现更多的问题,我努力争取早日发布稳定版本 1.1.0

itmanyong commented 3 years ago

欢迎发现更多的问题,我努力争取早日发布稳定版本 1.1.0

打包后的数据修改日志还在~~~

fantasticsoul commented 3 years ago

好的我把多余的日志关掉

fantasticsoul commented 3 years ago

还麻烦更新到1.0.15哈,fix了嵌套对象更新的问题,test用例如下

https://github.com/tnfe/limu/blob/main/test/array-other/object-item-nested.ts https://github.com/tnfe/limu/blob/main/test/map-other/case-nested-object.ts