-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Add support for JSX fragments #25
Add support for JSX fragments #25
Conversation
If you want to fix the build error, you can drop |
Great, thanks for the fix! I was gonna do it today but you beat me to it. I haven't tried it in my projects yet to be honest, but I wrote the new tests taking into account how I would use it and what I would expect from it. Do you spot anything that I could've missed, or any particular manual test that would be healthy to perform? |
readme.md
Outdated
pragmaFrag: "DocumentFragment", | ||
} | ||
] | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use single-quotes
@@ -78,6 +81,7 @@ const build = (tagName, attrs, children) => { | |||
}; | |||
|
|||
function h(tagName, attrs) { | |||
// eslint-disable-next-line prefer-rest-params |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you disabling this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My intent was to keep the original source code as intact as possible, so I decided the disable the rule for the line below instead of changing it. I have no problem in fixing it though, if you prefer :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, what you have is ok. Was just wondering whether there was another reason you disabled it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also added ticks and a link to pragma
as well to keep it consistent, let me know if that's ok.
@@ -78,6 +81,7 @@ const build = (tagName, attrs, children) => { | |||
}; | |||
|
|||
function h(tagName, attrs) { | |||
// eslint-disable-next-line prefer-rest-params |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My intent was to keep the original source code as intact as possible, so I decided the disable the rule for the line below instead of changing it. I have no problem in fixing it though, if you prefer :)
Thanks @reyronald, great PR! |
Closes #18
Now that Babel 7 was officially released a few days ago, I think we can add fragments support here.
How do you feel about it? Do you think we should say something different in the README? How about the implementation?