fix(react): FrameworkDelegate matches API

This commit is contained in:
Kevin Groat
2018-04-11 10:31:07 -04:00
committed by Manu MA
parent 2c9d485d2d
commit e40a6b0e94
3 changed files with 4163 additions and 8 deletions

View File

@ -16,13 +16,9 @@ export function attachViewToDom(parentElement: HTMLElement, reactComponent: any,
// mount the React component
const reactElement = React.createElement(reactComponent, propsOrData);
const mountedComponentInstance = ReactDOM.render(reactElement, wrappingDiv);
ReactDOM.render(reactElement, wrappingDiv);
return Promise.resolve({
element: wrappingDiv,
reactElement: reactElement,
instance: mountedComponentInstance
});
return Promise.resolve(wrappingDiv);
}
export function removeViewFromDom(parentElement: HTMLElement, childElement: HTMLElement): Promise<any> {