【发布时间】:2020-02-11 14:00:56
【问题描述】:
我知道if string的写法是
this.state ={event_email: ''}
但是如果我需要的值是整数呢?
this.state={id: //??}
【问题讨论】:
-
你可以在jsx中使用
id:0或id:null,在typescript中你可以定义interface
标签: reactjs constructor integer long-integer