Skip to content

Allow rendering into a document fragment #840

Closed
@wereHamster

Description

@wereHamster

Shadow roots have nodeType == DOCUMENT_FRAGMENT_NODE. When trying to render into one, react throws an error:

Exception caught during observer callback:
  Error: Invariant Violation: _registerComponent(...):
    Target container is not a DOM element.

There is an explicit check to only allow rendering into ELEMENT_NODE_TYPE and DOC_NODE_TYPE. Is there any particular reason why document fragments are excluded there?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions