美文网首页
react native state

react native state

作者: 阿莱_1b6f | 来源:发表于2017-04-02 23:44 被阅读0次

 作用

1. 用于更新当前component的值

比如根据输入框的输入值来来更新当前component的list view

```

constructor(props) {

super(props);

this.state = {

input: 'Go',

};

}

```

用法

1. 首先在constructor声明一下

2. 在当前component直接使用即可

相关文章

网友评论

      本文标题:react native state

      本文链接:https://www.haomeiwen.com/subject/xsrnottx.html