Skip to content

Commit 3499981

Browse files
author
William
committed
refactor(RootSiblingsManager): Updates the component structure and exports the default root component.
- Modifies the `wrapRootComponent` return value to include the root component. - Adds a `DefaultRootSiblingParent` export for external access to the root component. - Refactors the component initialization logic to support the new return structure.
1 parent da422f3 commit 3499981

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/RootSiblingsManager.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function setSiblingWrapper(wrapper: (sibling: ReactNode) => ReactNode) {
2222
siblingWrapper = wrapper;
2323
}
2424

25-
const { manager: defaultManager } = wrapRootComponent(
25+
const { Root, manager: defaultManager } = wrapRootComponent(
2626
ChildrenWrapper,
2727
renderSibling
2828
);
@@ -41,6 +41,8 @@ function getActiveManager(id: string | number | symbol): RootSiblingManager {
4141
return defaultManager;
4242
}
4343

44+
export { Root as DefaultRootSiblingParent };
45+
4446
export default class RootSiblingsManager {
4547
private id: string;
4648
private manager: RootSiblingManager;

0 commit comments

Comments
 (0)