在 TypeScript 和 JSX (即 TSX) 中,你可以通过定义一个 state 来控制 div 的显示和隐藏。以下是一个简单的示例: import * as React from 'react'; interface MyComponentState { isDi..