Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

node._owner is too unstable #5

Closed
@kthjm

Description

@kthjm

#4 is insufficient. node._owner is not always null.

ReactElement.js#L259

return ReactElement(
    type,
    key,
    ref,
    self,
    source,
    ReactCurrentOwner.current, // ← become _owner directry
    props,
  );

ReactCurrentOwner.js

var ReactCurrentOwner = {
  /**
   * @internal
   * @type {ReactComponent}
   */
  current: (null: null | ReactInstance | Fiber),
};

node._owner is so unstable that it is new ReactCompositeComponentWrapper at my local. so can't use it for detect.

React own detect its element by isValidElement function use Symbol, But i don't know whether hast-to-hyperscript relate it better.

sorry for the confusion. my did was superficial.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions