Replies: 1 comment
-
你好,在 React 并行模式下,render 会出现暂停的情况,这时如果 ref 对象被修改,就会出现不一致的问题。具体到 useSubscription 中,如果暂停过程中 Observable 被换掉,则 Observer 在切换之前有可能拿到旧 Observable 输出的值。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
不是很理解。
是因为某次 reconcile 过程中 ref 的值已经被修改了,但是之后却被打断了,然后 effect 还在用老的状态?
Beta Was this translation helpful? Give feedback.
All reactions