Skip to content

Parcel appendTo appears to be broken #157

@alanquigley-toast

Description

@alanquigley-toast

When I set appendTo on a Parcel, I get a mount failure. The error leads back to the following line:

this.parcel = mountParcel(this.props.config, {

When appendTo is set, the following React.createElement call never happens, so this.el is never set.

return React.createElement(

When the call to getParcelProps function is made on line L51 the domElement is internally set to undefined, and the spread overrides the created domElement on L50

const parcelProps = { ...this.props, domElement: this.el };

My question is, does this look like a bug, or is it related to my use-case currently. It seems like a bug.

Swapping lines L51 with L50 so that the newly generated domElement is added after the getParcelProps call does resolve the issue.

Happy to create a PR if required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions