className="foo" vs. class="foo" in .tsx
jkleiser opened this issue · 1 comments
jkleiser commented
In your book, page 79, I read "Notice that we use className to represent the class property in JSX instead of class." That is also what one does in React. However, when I create a new SPA by doing npx apprun --init --spa
, the file main.tsx that I get contains a lot of className="nav*". That made think that I could use class instead of className in other .tsx files as well, and it seemed to work. Could you please explain?
yysun commented
There are new features added after the book is published. Supporting
_class_ was one of them. I think the book is only up to 1.15/2.15.
…On Fri, Dec 6, 2019 at 9:14 AM Jon Kleiser ***@***.***> wrote:
In your book, page 79, I read "Notice that we use className to represent
the class property in JSX instead of class." That is also what one does in
React. However, when I create a new SPA by doing npx apprun --init --spa,
the file main.tsx that I get contains a lot of className="nav*". That made
think that I could use class instead of className in other .tsx files as
well, and it seemed to work. Could you please explain?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#82?email_source=notifications&email_token=AABJUM7WQEZ57XFC77V7CP3QXJM3VA5CNFSM4JWYM3CKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H6UOPBQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABJUM5PSB2GDEOSOJJYYMDQXJM3VANCNFSM4JWYM3CA>
.