feat: provide Fragment component
Adds a new Fragment component that provides the same functionality as React.Fragment. See issue #9 for details. closes issue #9
This commit is contained in:
parent
b112dc2d97
commit
da241efb59
4 changed files with 43 additions and 4 deletions
|
|
@ -44,3 +44,9 @@ export interface Component<P extends object = {}> {
|
|||
}
|
||||
): HTMLElement;
|
||||
}
|
||||
|
||||
export const Fragment: Component<{}> = ({ children }) => ({
|
||||
tag: "#fragment",
|
||||
attributes: {},
|
||||
children: children || [],
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue