Skip to content

Conversation

@blikblum
Copy link
Contributor

Makes jsx to htm babel transform handle JSX fragments both React.Fragment and short (<></>) syntax.

Basically removes the fragment nodes

@developit
Copy link
Owner

Isn't the default behaviour what folks want here?

// input:
<Fragment>
  <div />
  <div />
</Fragment>

// output:
html`
  <${Fragment>
    <div />
    <div />
  </${Fragment}>
`

@blikblum
Copy link
Contributor Author

Isn't the default behaviour what folks want here?

No. React.Fragment and its short syntax <></> exists to support multiple roots in JSX/React. Since htm supports multiple roots without special markup there's no need for it

@developit
Copy link
Owner

@blikblum seems reasonable. I'll need a bit to properly review.

@developit developit requested review from developit and jviide and removed request for jviide June 4, 2019 16:18
Copy link
Collaborator

@jviide jviide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea is sound 👍 Added a couple of suggestions regarding the structure and formatting, and added a suggestion to use this opportunity to make the plugin more robust overall.

@jviide jviide self-requested a review June 6, 2019 00:12
Copy link
Collaborator

@jviide jviide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Great job, @blikblum 👍

@jviide jviide merged commit c5764b5 into developit:master Jun 13, 2019
@jviide
Copy link
Collaborator

jviide commented Jun 13, 2019

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants