如何评论 .tsx 文件?
How to comment on .tsx file?
我想评论如下所示的 JSX 代码。我该怎么做?
<Form.Group controlId="type"> <Form.Label>Type</Form.Label>
要在 JSX 中间添加注释,请使用花括号弹出回普通 javascript,然后添加您的注释:
<Form.Group controlId="type">
{/* Hello World */}
<Form.Label>Type</Form.Label>
</Form.Group>
Typescript 不会改变这一点。
我想评论如下所示的 JSX 代码。我该怎么做?
<Form.Group controlId="type"> <Form.Label>Type</Form.Label>
要在 JSX 中间添加注释,请使用花括号弹出回普通 javascript,然后添加您的注释:
<Form.Group controlId="type">
{/* Hello World */}
<Form.Label>Type</Form.Label>
</Form.Group>
Typescript 不会改变这一点。