Typescript: React event types

前端 未结 8 894
故里飘歌
故里飘歌 2020-11-27 11:50

What is the correct type for React events. Initially I just used any for the sake of simplicity. Now, I am trying to clean things up and avoid use of any<

8条回答
  •  离开以前
    2020-11-27 12:26

    for update: event: React.ChangeEvent for submit: event: React.FormEvent for click: event: React.MouseEvent

提交回复
热议问题