React TypeScript 报 TS6133 错误的解决方法

React TypeScript About 226 words

点击事件

<button onClick={(e) => {
        console.log("111");
    }}
</button>

TS6133

TS6133: e is declared but its value is never read.

解决方法

使用_接收不需要使用的变量。

<button onClick={(_) => {
        console.log("111");
    }}
</button>
Views: 23 · Posted: 2025-12-08

————        END        ————

Give me a Star, Thanks:)

https://github.com/fendoudebb/LiteNote

扫描下方二维码关注公众号和小程序↓↓↓

扫描下方二维码关注公众号和小程序↓↓↓
Today In History
Browsing Refresh