I'm torturing myself for hours now and can't find an answer.
(我正在折磨自己几个小时,找不到答案。)
Where exactly, under what object/key, the React data are located? (React数据到底位于哪个对象/键的哪个位置?)
I found an object ReactRoot
that seems to store all the information about components, but I have no idea where it sits in the window (I guess?) object. (我找到了一个对象ReactRoot
,该对象似乎存储了有关组件的所有信息,但是我不知道它在窗口对象中的位置(我猜吗?)。)
It has to be somewhere under the window object, right?
(它必须在窗口对象下的某个地方,对吗?)
If you take a memory snapshot and select the ReactRoot
constructor from the list, chrome will create a reference to it under $0
( $0 in chrome ).
(如果获取内存快照并从列表中选择ReactRoot
构造函数,则chrome将在$0
( chrome中为$ 0 )下创建对其的引用。)
EDIT
(编辑)
Is it possible that ReactRoot is declared in a way that makes it inaccessible for other objects?
(是否有可能以其他对象无法访问的方式声明ReactRoot?)
How is this possible in js? (这在js中怎么可能?)
React isn't getting any special treatment from the browsers, is he? (React没有从浏览器中获得任何特殊待遇,是吗?)
ask by platinum_ar translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…