Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>html-to-reactNew to Visual Studio Code? Get it now.
html-to-react

html-to-react

victorbaudot

|
9,905 installs
| (1) | Free
Converts HTML code to React JSX
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Convert HTML to React JSX

A simple Visual Studio Code plugin that converts html text to React JSX.

Just cmd + shift + P -> Convert HTML to React JSX in the document you want to edit and run it.

converting and html text to JSX

How does it work

It simply replaces html tags with React ones.

Here's the current list:

var mapObj = {
  "class=": "className=",
  "for=": "htmlFor=",
  "-rule": "Rule",
  "stroke-l": "strokeL",
  "stroke-w": "strokeW",
  "<!--": "{/*",
  "-->": "*/}",
  tabindex: "tabIndex",
};

Open a pull request to add missing rules.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft