【发布时间】:2026-01-02 05:15:01
【问题描述】:
我想评论我在下面显示的 TSX 代码。我该怎么做?
<Form.Group controlId="type"> <Form.Label>Type</Form.Label>
【问题讨论】:
标签: reactjs typescript comments tsx
我想评论我在下面显示的 TSX 代码。我该怎么做?
<Form.Group controlId="type"> <Form.Label>Type</Form.Label>
【问题讨论】:
标签: reactjs typescript comments tsx
要在 JSX 中间添加评论,请使用大括号返回纯 javascript,然后添加您的评论:
<Form.Group controlId="type">
{/* Hello World */}
<Form.Label>Type</Form.Label>
</Form.Group>
Typescript 不会改变这一点。
【讨论】: