crimx/observable-hooks

[bug]: 3.0 Suspense with react-devtool render error

liaoyinglong opened this issue · 1 comments

英语不好,下面用中文说明

codesandbox url

https://codesandbox.io/s/serverless-snowflake-h4erc?fontsize=14&hidenavigation=1&theme=dark

bug

  1. 打开devtool 选中 Suspense 的 children
    image
  2. 点击按钮,等待1S后界面不会更新

预期

  1. 界面会更新

other

  1. F5刷新界面的时候没有在devtool选中 Suspense 的 children,点击按钮的效果是符合预期。

如下gif:

bug

crimx commented

应该是 react-devtools 的 bug,每次更新 useStatesetState 函数都会被更换。我可以兼容这个情况,但先去反馈一下看看什么结果。

This should be a bug of react-devtools which is polluting the setState function of useState. I could make useObservableSuspense bypass this bug but rather fire an issue first and see how it goes.