Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for basic fragments #42

Open
SamJBarney opened this issue Jul 31, 2023 · 1 comment
Open

Support for basic fragments #42

SamJBarney opened this issue Jul 31, 2023 · 1 comment

Comments

@SamJBarney
Copy link

Basic support for fragments is pretty simple:

export function createFragment(attributes: Attributes & Children | undefined = {},
    contents: string[]) {
        console.log(contents)
    return contents.join('')
}

Example of usage

Forcing sorting using <Fragment key="some id"> would take some work and could be considered for a later release.

See React Fragments

@arthurfiorette
Copy link

Hey @SamJBarney, This library seems to be unmaintained, (no license #23, no fragment support...) I'm maintaining @kitajs/html with some extra features I wanted to add, like fragments, ~3x times faster, a pre-compiled mode, null/undefined handling, preact (h) build systems compatible and more... Have a look at it!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants