标签: javascript reactjs
在mount中说的文档中,卸载。但是每当主人收到道具时,我都会看到他们被召唤。
nullptr
任何人都可以确认预期的行为吗?
我唯一的另一个想法是另一个HOC正在干扰。我正在使用<A> <B ref={(component) => console.log(blah)}> </B> <A> 来封装ref回调。
<A> <B ref={(component) => console.log(blah)}> </B> <A>
refs的代码在下面的链接中,但我似乎无法解决这个问题。
https://github.com/facebook/react/blob/38acadf6f493926383aec0362617b8507ddee0d8/src/renderers/shared/reconciler/ReactRef.js
答案 0 :(得分:0)
我认为它们在render上运行,因为在那之前你没有DOM引用。
render