parse-community / ParseReact

Seamlessly bring Parse data into your React applications.
https://parseplatform.org
Other
1.3k stars 209 forks source link

Populating ReactNative dataSources #100

Open i8ramin opened 9 years ago

i8ramin commented 9 years ago

Been trying this for a few hours now and I just can't get it to work. Asking here is pretty much my last resort. The gist below is my entire React Native app. If clues on how to make the two work together would be greatly appreciated!

https://gist.github.com/i8ramin/26dec49fa2fc21f4456f (also has my package.json file there)

Basically, I get the app to load up and it shows the spinner indicator, but can't get it to display the ListView.

Any help would be greatly appreciated!

i8ramin commented 9 years ago

I think I got it! The gist below seems to be working ... not sure if its the "correct" way to do it, but yeah, it works.

https://gist.github.com/i8ramin/c68101e0f59f0462e847

The key was this line inside of my renderListView method:

var dataSource = this.state.dataSource.cloneWithRows(this.data.items);

And then pass that new dataSource to the ListView dataSource property.

andrewimm commented 9 years ago

I'll be honest, I still don't have a good answer for how to populate a ListView DataSource with the subscription of a query. We've discussed it with the React Native team, and are exploring a number of approaches

xcarpentier commented 9 years ago

@andrewimm : Do you have some news about this topic ?

mutp commented 9 years ago

+1

dorongutman commented 9 years ago

+1

olivierlesnicki commented 8 years ago

+1

baocin commented 8 years ago

+1