react-native-root-siblings
Advanced tools
Comparing version 4.0.0-beta.11 to 4.0.0-beta.12
@@ -0,1 +1,2 @@ | ||
import React from 'react'; | ||
import { ReactNode } from 'react'; | ||
@@ -11,5 +12,5 @@ export declare function setSiblingWrapper(wrapper: (sibling: ReactNode) => ReactNode): void; | ||
children: ReactNode; | ||
}): JSX.Element; | ||
}): React.FunctionComponent<{}>; | ||
export declare function RootSiblingPortal(props: { | ||
children: ReactNode; | ||
}): null; |
@@ -45,10 +45,10 @@ import React from 'react'; | ||
if (!SiblingParent) { | ||
const { Root: Parent, manager: parentManager } = wrapRootComponent(ChildrenWrapper, renderSibling); | ||
const { Root: Parent, manager: parentManager } = wrapRootComponent(() => <ChildrenWrapper>{props.children}</ChildrenWrapper>, renderSibling); | ||
currentManager = parentManager; | ||
managerStack.push(parentManager); | ||
setSiblingParent(Parent); | ||
return <Parent>{props.children}</Parent>; | ||
return Parent; | ||
} | ||
else { | ||
return <SiblingParent>{props.children}</SiblingParent>; | ||
return SiblingParent; | ||
} | ||
@@ -55,0 +55,0 @@ } |
{ | ||
"version": "4.0.0-beta.11", | ||
"version": "4.0.0-beta.12", | ||
"name": "react-native-root-siblings", | ||
@@ -4,0 +4,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
663
34656