Reputation: 941
First attempt at pulling data from an API into react native, I think im pretty close but I am getting "Cannot read property 'DataSource' of undefined".
https://gist.github.com/ElliotReeve/a15ef765dab8267fd952b6483c0b4a32
Not sure what I am doing wrong?
Upvotes: 0
Views: 542
Reputation: 8936
This is just a guess... but I think you're mixing up RN ListView with native-base. You're setting it up like RN's ListView but then using NB. I don't think you need to set a DataSource if you're using NB and just pass a normal array into ListView as dataArray
and they will handle all that for you.
this.state = {
appointments: []
}
...
<ListView dataArray={this.state.appointments}>
Upvotes: 1