[bug]: 3.0 Suspense with react-devtool render error
liaoyinglong opened this issue · 1 comments
liaoyinglong commented
英语不好,下面用中文说明
codesandbox url
https://codesandbox.io/s/serverless-snowflake-h4erc?fontsize=14&hidenavigation=1&theme=dark
bug
预期
- 界面会更新
other
- F5刷新界面的时候没有在devtool选中 Suspense 的 children,点击按钮的效果是符合预期。
如下gif:
crimx commented
应该是 react-devtools 的 bug,每次更新 useState
的 setState
函数都会被更换。我可以兼容这个情况,但先去反馈一下看看什么结果。
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.