從今天開始記錄下學(xué)習(xí)React-native的東西哈。
npm installl
npm start
先上固定寫法,先創(chuàng)建一個(gè)對象,然后就是 row 和 section的固定寫法。
this.state里面的是listview的datasource。

Paste_Image.png
第一個(gè)方法是row 第二個(gè)是section

Paste_Image.png
最后在render(),里面渲染ListView。render()里只可以在最外層有一個(gè)總的View。

Paste_Image.png
下面是最后的運(yùn)行結(jié)果。

Paste_Image.png