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

Beginner friendly babel-plugin-htm #47

Closed
PeteSolid opened this issue Dec 21, 2018 · 6 comments
Closed

Beginner friendly babel-plugin-htm #47

PeteSolid opened this issue Dec 21, 2018 · 6 comments
Labels
discussion Discussions and proposals documentation

Comments

@PeteSolid
Copy link

PeteSolid commented Dec 21, 2018

Hi, I'm relatively new to web development and only know a little about babel - and webpack.
So I want to start a new project and have my webpack config which holds my babel config. I don't know if this is best practice ... anyway - I would like to add the plugin but I am struggeling with it.

Is it possible to change the readme for this plugin so that noobs like me can understand where to put:
[ ["htm", { "pragma": "React.createElement" }] ]

Thank you for htm!

@developit
Copy link
Owner

I think we can do that! Maybe little sections for each that you can click to show.

@developit
Copy link
Owner

Also just a note - you don't need the Babel plugin at all to get started. It's just if you want to compile HTM down to function calls in production, perhaps to support IE11.

@PeteSolid
Copy link
Author

Yes, thanks for the note 😄 Also less Bytes to send for the user 👀
So it's opt-in but I like to make the most out of it

@developit
Copy link
Owner

@PeteSolid this is actually one case where performance can be quite counterintuitive :) I'm going to be publishing some results soon that show it can be beneficial to ship HTM and parse Tagged Templates at runtime since it considerably reduces the parse cost of large applications otherwise built with JSX.

@developit developit added the discussion Discussions and proposals label Jan 7, 2019
@PeteSolid
Copy link
Author

PeteSolid commented Jan 8, 2019

That's interesting ! OK, thats kinda closes the relevance of the initial Issue 😃
So I think people should be noticed in the readme that not using the Plugin also has a Benefit - once the results are published?

@developit
Copy link
Owner

Definitely! I'm hoping to publish things soon, and then it would be a good time to revisit htm's readme and adjust some of the positioning around our Babel integration.

JodiWarren added a commit to JodiWarren/htm that referenced this issue Oct 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussions and proposals documentation
Projects
None yet
Development

No branches or pull requests

2 participants