It seems that in react@16 every React element children contains cyclic property ._owner.alternate.alternate.alternate.alternate....

So it is easy to cause "Maximum call stack exceeded" error when developer compares props.children in deep way(like deep-equal).
This caused bugs for community libraries like react-helmet:
nfl/react-helmet#441
I am extremely curious about:
Why React has _owner.alternate, and what it stands for?
As it is named as “_owner”, could it be better if we make “owner” not enumerable?
I tried to search source code and but still can’t find any clue.
Thanks in advance.
It seems that in react@16 every React element children contains cyclic property
._owner.alternate.alternate.alternate.alternate....So it is easy to cause "Maximum call stack exceeded" error when developer compares
props.childrenin deep way(like deep-equal).This caused bugs for community libraries like react-helmet:
nfl/react-helmet#441
I am extremely curious about:
Why React has
_owner.alternate, and what it stands for?As it is named as “_owner”, could it be better if we make “owner” not enumerable?
I tried to search source code and but still can’t find any clue.
Thanks in advance.