Created
April 17, 2019 15:04
-
-
Save maxkoretskyi/d542245e7ba9727be307ccf496fd2446 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class ReactComponent extends BaseReactComponent { | |
private createReactComponent(params: any, resolve: (value: any) => void) { | |
const ReactComponent = React.createElement(this.reactComponent, params); | |
const portal: ReactPortal = ReactDOM.createPortal( | |
ReactComponent, | |
this.eParentElement | |
); | |
this.portal = portal; | |
this.parentComponent.mountReactPortal(portal!, this, resolve); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment