protoship / html-to-rescript-jsx Goto Github PK
View Code? Open in Web Editor NEWConvert plain HTML to a valid ReScript JSX component
Home Page: https://html-to-rescript-jsx.protoship.io/
License: MIT License
Convert plain HTML to a valid ReScript JSX component
Home Page: https://html-to-rescript-jsx.protoship.io/
License: MIT License
Currently, if we use it with these tag:
<input />
<input class="disabled" />
<input class="success" />
<input class="warning" />
<input class="danger" />
<br>
<img src="img.jpg" />
<div class="input-group prefix">
<span class="label prefix">Company</span>
<input />
</div>
<img src="https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.png" />
<br>
<hr>
<input type="number" placeholder="Enter your favorite number">
we get this output:
let s = React.string
@react.component
let make = () => {
<>
<input >
</input>
<input className="disabled">
</input>
<input className="success">
</input>
<input className="warning">
</input>
<input className="danger">
</input>
<br >
</br>
<img src="img.jpg">
</img>
<div className="input-group prefix">
<span className="label prefix">
{s("Company")}
</span>
<input >
</input>
</div>
<img src="https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.png">
</img>
<br >
</br>
<hr >
</hr>
<input type_="number" placeholder="Enter your favorite number">
</input>
</>
}
Ideally it should be:
let s = React.string
@react.component
let make = () => {
<>
<input />
<input className="disabled" />
<input className="success" />
<input className="warning" />
<input className="danger" />
<br />
<img src="img.jpg" />
<div className="input-group prefix">
<span className="label prefix">
{s("Company")}
</span>
<input />
</div>
<img src="https://cdn.sstatic.net/Sites/stackoverflow/company/img/logos/so/so-icon.png" />
<br />
<hr />
<input type_="number" placeholder="Enter your favorite number" />
</>
}
Raising a PR for a fix :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.