Closed jpeg729 closed 7 years ago
I can't just copy-paste some html into my render method without making a few tedious changes...
<div class="">
<div className="">
<div multi-word-attribute>
<div multiWordAttribute>
<!-- comment -->
{/* comment */}
<div style="border: 1px solid red">
<div style={{border: '1px solid red'}}>
The first is necessary because class is a js reserved keyword, the second because multi-word is a subtraction in js.
class
multi-word
BUT jsx isn't javascript - it gets compiled to js. So here are my questions...
PS. I know there are converters like http://magic.reactjs.net/htmltojsx.htm but that adds an extra step to the process
You are in the wrong repo.
I can't just copy-paste some html into my render method without making a few tedious changes...
<div class="">
must become<div className="">
<div multi-word-attribute>
must become<div multiWordAttribute>
<!-- comment -->
must become{/* comment */}
or be deleted.<div style="border: 1px solid red">
must become<div style={{border: '1px solid red'}}>
The first is necessary because
class
is a js reserved keyword, the second becausemulti-word
is a subtraction in js.BUT jsx isn't javascript - it gets compiled to js. So here are my questions...
PS. I know there are converters like http://magic.reactjs.net/htmltojsx.htm but that adds an extra step to the process