Skip to content

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

Open

Description

@masx200

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".

Activity

  1. masx200 commented on Aug 20, 2021

    @masx200
    Author

    #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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions