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

Is there a plug-in to use "html2react" and "htm" together? #211

Open
masx200 opened this issue Aug 16, 2021 · 1 comment
Open

Is there a plug-in to use "html2react" and "htm" together? #211

masx200 opened this issue Aug 16, 2021 · 1 comment

Comments

@masx200
Copy link

masx200 commented Aug 16, 2021

Is there a plug-in to use "html2react" and "htm" together?

https://www.npmjs.com/package/html2react

const html = htm.bind(html2react);

let reactvdom=html` 
  <h1 class="foo"
>Foo</h1>
  <p><a href="#" style="text-decoration: none;">Bar</a></p>
  <p onclick=${()=>{}}>Baz</p>
`

For example, the attribute "class" is converted to "className", and the attribute "style" is converted from a string to an object?the attribute "onclick" is converted to "onClick".

@masx200
Copy link
Author

masx200 commented Aug 20, 2021

#212

It seems that you cannot use "babel-plugin-htm" and "babel-plugin-react-html-attrs" together at compile time?

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

1 participant