C-o-m-o-n / Html2React

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

Home Page:https://marketplace.visualstudio.com/items?itemName=PabitraBanerjee.html2react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Convert HTML to React JSX

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

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

Html2React

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.

About

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

https://marketplace.visualstudio.com/items?itemName=PabitraBanerjee.html2react

License:MIT License


Languages

Language:JavaScript 100.0%