mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
fix(react): FrameworkDelegate matches API
This commit is contained in:
4160
react/package-lock.json
generated
Normal file
4160
react/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -34,8 +34,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@ionic/core": "next",
|
"@ionic/core": "next",
|
||||||
"react": "latest",
|
"react": "latest",
|
||||||
"react-dom": "latest",
|
"react-dom": "latest"
|
||||||
"typescript": "~2.5.2"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@stencil/core": "next"
|
"@stencil/core": "next"
|
||||||
|
@ -16,13 +16,9 @@ export function attachViewToDom(parentElement: HTMLElement, reactComponent: any,
|
|||||||
|
|
||||||
// mount the React component
|
// mount the React component
|
||||||
const reactElement = React.createElement(reactComponent, propsOrData);
|
const reactElement = React.createElement(reactComponent, propsOrData);
|
||||||
const mountedComponentInstance = ReactDOM.render(reactElement, wrappingDiv);
|
ReactDOM.render(reactElement, wrappingDiv);
|
||||||
|
|
||||||
return Promise.resolve({
|
return Promise.resolve(wrappingDiv);
|
||||||
element: wrappingDiv,
|
|
||||||
reactElement: reactElement,
|
|
||||||
instance: mountedComponentInstance
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function removeViewFromDom(parentElement: HTMLElement, childElement: HTMLElement): Promise<any> {
|
export function removeViewFromDom(parentElement: HTMLElement, childElement: HTMLElement): Promise<any> {
|
||||||
|
Reference in New Issue
Block a user