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.
When I set
appendToon a Parcel, I get a mount failure. The error leads back to the following line:single-spa-react/src/parcel.js
Line 49 in c2cf485
When appendTo is set, the following
React.createElementcall never happens, sothis.elis never set.single-spa-react/src/parcel.js
Line 104 in 13e9fc8
When the call to getParcelProps function is made on line
L51thedomElementis internally set to undefined, and the spread overrides the createddomElementon L50single-spa-react/src/parcel.js
Line 155 in 13e9fc8
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
domElementis added after the getParcelProps call does resolve the issue.Happy to create a PR if required.