ParseReact icon indicating copy to clipboard operation
ParseReact copied to clipboard

Populating ReactNative dataSources

Open i8ramin opened this issue 10 years ago • 7 comments

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 avatar Aug 02 '15 22:08 i8ramin

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.

i8ramin avatar Aug 02 '15 23:08 i8ramin

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

andrewimm avatar Aug 04 '15 19:08 andrewimm

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

xcarpentier avatar Sep 24 '15 20:09 xcarpentier

+1

mutp avatar Nov 06 '15 18:11 mutp

+1

dorongutman avatar Nov 06 '15 21:11 dorongutman

+1

olivierlesnicki avatar Dec 06 '15 20:12 olivierlesnicki

+1

baocin avatar Dec 08 '15 05:12 baocin