UNPKG

react-native-root-siblings

Version:

react native root sibling elements manager

20 lines 747 B
import { jsx as _jsx } from "react/jsx-runtime"; import RootController from './RootController'; import RootSiblings from './RootSiblings'; export default function wrapRootComponent(Root, renderSibling) { const controller = new RootController(); return { Root: (props) => { return (_jsx(RootSiblings, { controller: controller, renderSibling: renderSibling, children: _jsx(Root, Object.assign({}, props)) })); }, manager: { update(id, element, callback) { controller.update(id, element, callback); }, destroy(id, callback) { controller.destroy(id, callback); } } }; } //# sourceMappingURL=wrapRootComponent.js.map