htm icon indicating copy to clipboard operation
htm copied to clipboard

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

Open masx200 opened this issue 4 years ago • 1 comments

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 avatar Aug 16 '21 10:08 masx200

https://github.com/developit/htm/issues/212

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

masx200 avatar Aug 20 '21 01:08 masx200