二货爱吃白萝卜

Results 181 comments of 二货爱吃白萝卜

> 那么针对上述问题,是否需要写到文档呢 @zombieJ @afc163 控制台里可以报一下,说 advance 转换失败,降级成兼容包之类的。

转换失败后应该自动降级回原来的兼容包模式并且 console 告知当前状态转换失败,如果可以也可以列举转换失败的原因,这个过程除了开头的命令参数不需要用户额外参与。

> 其实不太能做到,因为只有转换之后实际运行的时候才会知道有没有转换成功。我最初的想法是想让用户在迁移的时候能够有个工具帮他们做掉一些重复的工作,只能算是一个工具配合手动迁移使用,剩下的工作还是需要自己来手动完成。 这样会有非常多的答疑成本,用户转化完成后总是希望代码可以正常运行。如果我们的逻辑会有疏漏,使用时也不一定能够立刻发现。可以看看弄一些模式匹配,如果是符合某些条件再执行自动转换。要么不转,转完就能符合预期的跑。如果需要运行时 debug 找原因反而就提高用户的迁移成本了。

since `onChange` func is always new when render. I think we can cache this.

`onChange` put in `useEffect` deps but it will be new ref for each render which means `onChange` will repeat trigger. This makes validation is always OOD.

PS: You can tmp remove `onChange` in `useEffect` deps instead.

看起来 StrictMode Effect 多次触发的问题

虚拟滚动 Demo 只实现了滚动以展示自定义内容的 API。欢迎提交 PR 帮助完善固定列的功能~ Virtual scroll demo is only apply scroll to show the customize body API. Welcome PR to fullfill the demo~

This is by design to avoid SSR unsync since server side always not has the value of screen size. Please feel free to PR if have better solution.

This is by design since first render with screen info will break SSR hydrate.