React 中监听 input 的 onChange 事件的原生事件是什么
Issue 欢迎在 Gtihub Issue 中回答此问题: Issue 611
Author 回答者: shfshanyue
import "./styles.css";
export default function App() {
return (
<div className="App">
<input
onChange={(e) => {
console.log("Event: ", e);
console.log("NativeEvent: ", e.nativeEvent);
console.log("CurrentTarget: ", e.nativeEvent.currentTarget);
console.log("NativeEvent Type: ", e.nativeEvent.type);
}}
/>
</div>
);
}