SyntheticEvent

在react 的事件中使用SyntheticEvent 就会出现下面的报错

<input
  onChange={async e => {
    await foo()
    ...
}}
/>

 

 

那么怎么解决呢?

<input
  onChange={async e => {
    e.persist()
    await foo()
    ...
}}
/>

 

posted @ 2019-02-21 18:11  明明一颗大白菜  阅读(439)  评论(0编辑  收藏  举报
<-- -->