作用
1. 用于更新当前component的值
比如根据输入框的输入值来来更新当前component的list view
```
constructor(props) {
super(props);
this.state = {
input: 'Go',
};
}
```
用法
1. 首先在constructor声明一下
2. 在当前component直接使用即可
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
网友评论