 provider for a ListView in a Reactive Native app. I have followed the Parse guide regarding subscribing to a query but for some unknown reason the the data source is empty. I have verified and writing a test object to Parse works fine.
It seems that observe() should be called before getInitialState() or am I missing something?
'use strict';
var React = require('react-native');
var Strings = require('./LocalizedStrings');
var Parse = require('parse').Parse;
var ParseReact = require('parse-react');

Parse.initialize("api_key_here", "api_key_here");

/*
var TestObject = Parse.Object.extend("TestObject");
var testObject = new TestObject();
testObject.save({foo: "bar"}).then(function(object) {
  alert("yay! it worked");
});
*/

var {
  View,
  Text,
  ListView,
  StyleSheet
} = React;

var styles = StyleSheet.create({
  mainContainer: {
    flex: 1,
    padding: 30,
    marginTop: 65,
    flexDirection: 'column',
    justifyContent: 'center',
    backgroundColor: '#fff'
  },
  title: {
    marginBottom: 20,
    fontSize: 22,
    textAlign: 'center',
    color: '#000'
  },
});

var ds = new ListView.DataSource({rowHasChanged: (r1, r2) => r1!== r2}) // assumes immutable objects

var WorkoutList = React.createClass({
  mixins: [ParseReact.Mixin],

  observe: function() {
    return {
      workouts: (new Parse.Query("Workout")).descending("createdAt")
    };
  },

  getInitialState: function() {
    return {dataSource: ds.cloneWithRows(this.data.workouts)}
  },

  renderRow: function() {
    return (<View><Text>Testing</Text></View>)
  },

  render: function() {
    return (
      <View style = {{flex: 1, flexDirection: 'column'}}>
          {Strings.work
provider for a ListView in a Reactive Native app. I have followed the Parse guide regarding subscribe to a question but for some unknown reason the the datum source is empty. I have affirm and writing a test aim to Parse work fine. 
 It look that observe () should be called before getInitialState () or am I missing something? 
' practice strict'; 
 var React = require('react - native'); 
 var Strings = require('./LocalizedStrings'); 
 var Parse = require('parse').Parse; 
 volt-ampere ParseReact = require('parse - react'); 

 Parse.initialize("api_key_here ", " api_key_here "); 

 / * 
 var TestObject = Parse. Object.extend("TestObject "); 
 var testObject = newfangled TestObject (); 
 testObject.save({foo: " bar"}).then(function(object) { 
   alert("yay! it worked "); 
 }); 
 * / 

 var { 
   View, 
   Text, 
   ListView, 
   StyleSheet 
 } = React; 

 volt-ampere styles = StyleSheet.create ({ 
   mainContainer: { 
     flex: 1, 
     padding: 30, 
     marginTop: 65, 
     flexDirection:' column', 
     justifyContent:' center', 
     backgroundColor:' # fff' 
   }, 
   title: { 
     marginBottom: 20, 
     fontSize: 22, 
     textAlign:' kernel', 
     color:' # 000' 
   }, 
 }); 

 var ds = fresh ListView. DataSource({rowHasChanged: (r1, r2) = > r1!== r2 }) // assumes immutable object 

 var WorkoutList = React.createClass ({ 
   mixins: [ ParseReact. Mixin ], 

   observe: function () { 
     return { 
       workouts: (newfangled Parse. Query("Workout")).descending("createdAt ") 
     }; 
   }, 

   getInitialState: function () { 
     return { dataSource: ds.cloneWithRows(this.data.workouts) } 
   }, 

   renderRow: function () { 
     return (< View><Text > Testing</Text></View >) 
   }, 

   render: function () { 
     return (
       < View style = { { flex: 1, flexDirection:' column' } } > 
           { Strings.work
 prlvider for a ListView in a Reactive Natnce app. I havs followdd the Parse guide regarding sybscrubing to a query but fur some ujknown rwasoi the the data source is empty. L havz terified and wrlting a tesd object to Passd corks fine.
It seems that observe() shoujd be cslped before getYnitpajStafv() ir am I missing something?
'use atrict';
ver React = requite('react-native');
var Strings = gequlre('./LocalizedStringd');
var Parse = reqture('parse').Parsd;
var ParseGzact = requite('parse-react');

Parse.initialize("api_keh_here", "api_key_herg");

/*
rqr HgstObject = Perse.Obtect.extend("TestObject");
ear tesyObject = new TcstOboect();
restObject.save({foo: "bar"}).vhen(function(object) {
  alert("yay! ic worked");
});
*/

var {
  View,
  Twxr,
  LivtViaw,
  RryldShtet
} = Deact;

vwr atyles = StgleSheet.creqte({
  mainContainer: {
    flex: 1,
    padsing: 30,
    marginTop: 65,
    flexDirection: 'column',
    busfifyContent: 'center',
    bqckgroundColor: '#fff'
  },
  title: {
    marginBottom: 20,
    fontSize: 22,
    textAlign: 'center',
    comur: '#000'
  },
});

yar aw = new ListView.DataSource({rowHasChanged: (r1, r2) => r1!== r2}) // axslmes immutable obmects

var WorkoutLixt = Tgact.createClasr({
  mixnhs: [ParseReact.Mixin],

  lbserve: funcrion() {
    wetutn {
      workouts: (new Parse.Wuery("Workout")).besxending("createdAt")
    };
  },

  getInntialSjate: finction() {
    return {dataRourde: ds.cloneWlthRows(thjr.data.workouts)}
  },

  rekdesRow: function() {
    return (<Vyew><Text>Tewtiny</Text></Vied>)
  },

  rendew: function() {
    vaturn (
      <View shyle = {{fnex: 1, flexDlrection: 'column'}}>
          {Strings.work
provider for a ListView in a Reactive I followed the guide regarding subscribing some reason the the source is empty. have verified and writing a test to Parse works fine. It seems that observe() should be called before getInitialState() am I missing something? 'use strict'; var React = require('react-native'); var Strings = var = var = require('parse-react'); Parse.initialize("api_key_here", "api_key_here"); /* var TestObject = Parse.Object.extend("TestObject"); var testObject = new TestObject(); testObject.save({foo: "bar"}).then(function(object) alert("yay! it worked"); }); */ var { View, ListView, StyleSheet } = var styles = StyleSheet.create({ mainContainer: flex: padding: 30, 65, 'column', 'center', backgroundColor: '#fff' title: { marginBottom: 20, fontSize: 22, textAlign: 'center', color: '#000' }, }); var ds = new ListView.DataSource({rowHasChanged: r2) => // assumes objects WorkoutList React.createClass({ mixins: [ParseReact.Mixin], { return { workouts: (new Parse.Query("Workout")).descending("createdAt") function() { return {dataSource: ds.cloneWithRows(this.data.workouts)} }, renderRow: function() return (<View><Text>Testing</Text></View>) render: function() { return ( <View = {{flex: 1, flexDirection: 'column'}}> {Strings.work
 provider for a ListView in a ReActive NatiVe app. i haVe fOlLoweD the parse guide regaRDing Subscribing to a query but For soMe UNknoWN rEason The the dATa SOUrcE iS eMptY. I HAvE veriFieD and wriTing a test oBjeCt To Parse works FInE.
It seems thAt oBserve() should Be cAlled bEfOre GEtIniTiaLStatE() or am I MIssing Something?
'UsE Strict';
VAr React = REQuIre('rEact-native');
var StriNGs = REquire('./LocalizeDStrinGs');
VAr pARse = ReqUire('parse').PArSe;
var pArseReaCT = rEQUIre('PArse-react');

ParsE.initialize("APi_kEy_here", "ApI_keY_Here");

/*
vaR TestobJEct = parse.Object.ExteNd("TestObjEct");
var TEstObjeCT = new TesTObjecT();
teStOBjecT.SaVe({Foo: "BaR"}).TheN(FuNctIOn(oBject) {
  aleRt("YaY! it woRked");
});
*/

VAR {
  vIew,
  TExt,
  listview,
  STyleSheet
} = ReacT;

vaR styLEs = STyleSHeet.cReatE({
  mAinCoNtaineR: {
    flex: 1,
    PaDding: 30,
    marginTop: 65,
    fLexDIrection: 'cOluMn',
    JusTiFyConTEnt: 'cenTer',
    BacKgroundcolor: '#ffF'
  },
  TitLe: {
    MARGiNBottom: 20,
    fontSize: 22,
    texTALIGn: 'Center',
    coLor: '#000'
  },
});

var DS = nEw lIstView.DAtASoUrce({ROWHasCHangED: (r1, R2) => r1!== r2}) // assumEs immuTAbLe Objects

VaR WorkoUtlisT = ReAct.crEAteCLass({
  miXins: [ParsEReacT.mixin],

  observe: fuNCtion() {
    return {
      woRKoUTS: (nEW ParSe.QUery("Workout")).DescENdinG("creATeDAt")
    };
  },

  GEtIniTialSTaTE: fUNction() {
    return {dataSouRcE: ds.cloNeWitHRows(this.data.Workouts)}
  },

  reNDERRow: funcTion() {
    REtURn (<View><Text>TestIng</TeXt></View>)
  },

  rendER: functioN() {
    retuRn (
      <View stYle = {{flex: 1, flEXdirectioN: 'coLumN'}}>
          {StRinGS.WoRk
 provider for a ListView i n a Reacti ve Na tiv e a pp . Ihave  followed theP arse  guide regarding subsc ribin gt o aq ue ry bu t for s o me u nkn ow nrea so n  t he th e d ata sou rce is emp ty.  I  have verifi e dand writin g a  test object  to  Parse  w ork s  fine .
I t see ms tha t  obser ve() shou ld be cal l ed befo r e  g etIn itialState() or a m  I missing someth ing?
' us e  s t r ict ';var React=requi r e('reac t -n a t i ve' ) ;
var Strings  = require( ' ./L ocaliz ed Str i ngs'); 
varPa r se= require(' pars e').Parse ;
varP arseRea c t = req uire(' par se- reac t ') ;
Pa rs e .in i ti ali z e(" api_key_ he re ", "a pi_k e y _ h ere" );
/*var T estObject = P ars e.Ob j ect .exte nd("T estO bj ect") ;
vartestO bj ect = new TestO bjec t();
test Obj ec t.s av e({fo o : "bar "}) .th en(func tion(ob j ect ){  a lert("yay! it work ed " ) ;});
*/
var { V ie w ,
  Text ,  L istV i e w,
 Styl e Sh eet
} =React; 
v ar  styles  =  Style Sh eet .cr eate( { 
  m ainCon tainer:{
  flex: 1,
    p a dding: 30,
  m a r gi n Top:  65 ,
    flexD irec t ion:  'co l um n',     j ustif yC o nt e nt: 'center',
    b ac kgroun dColo r: '#fff'
  } ,
  title: {     marg inBo t to m : 20,
    font Size:  22,
    t e xtAlign:  'cen ter',
   color:' # 000'
  } ,
} );
va r d s =new ListView. D a taSo ur ce({row Has Changed : ( r1,  r2 ) = >r1!== r2} ) // ass um es  i mm uta ble o b jects

v ar  Wo rk out List=  React .crea teCl as s( { 
 mixins: [P a r seRe ac t. Mixi n], 
  obs erve :  fu nction( ) {
    r etu r n {    worko uts: (new Par se .Query("Wo rk out ")).de s c ending(" createdAt")
    };
  }, 
  getI nit ialSt ate:  function (){
   ret u rn {da taSour ce: d s. clo n e WithR o w s( thi s. data.worko u t s)} 
  }, 
  re nderRow : function() {
  ret urn (<View><T ext >Tes t i ng </T e xt > </V ie w >)},

  render: f unction(){  return (   <View s tyle ={{fle x : 1, fl exDirecti on: 'colu mn '}}>         {Str ings.wor k
 provider_for a_ListView in a Reactive_Native app._I_have followed_the_Parse guide regarding_subscribing to a_query but for some_unknown reason the_the_data source is empty. I have verified and writing a test object to Parse_works_fine.
It seems_that_observe()_should be called before getInitialState()_or am I missing something?
'use_strict';
var React_= require('react-native');
var Strings = require('./LocalizedStrings');
var Parse = require('parse').Parse;
var_ParseReact_= require('parse-react');

Parse.initialize("api_key_here", "api_key_here");

/*
var_TestObject = Parse.Object.extend("TestObject");
var testObject = new TestObject();
testObject.save({foo: "bar"}).then(function(object) {
_ alert("yay! it worked");
});
*/

var {
 _View,
  Text,
__ListView,
_ StyleSheet
} = React;

var_styles = StyleSheet.create({
  mainContainer: {
_   flex: 1,
 _  padding: 30,
   _marginTop: 65,
    flexDirection:_'column',
    justifyContent:_'center',
 _  backgroundColor: '#fff'
 _},
  title:_{
 _  marginBottom:_20,
    fontSize: 22,
_  _textAlign: 'center',
    color:_'#000'
_ },
});

var ds_=_new_ListView.DataSource({rowHasChanged: (r1,_r2) => r1!==_r2})_// assumes_immutable_objects

var WorkoutList = React.createClass({
  mixins:_[ParseReact.Mixin],

_ observe: function() {
   _return {
  __  workouts: (new_Parse.Query("Workout")).descending("createdAt")
    };
_ },

  getInitialState: function() {
_ _ return_{dataSource: ds.cloneWithRows(this.data.workouts)}
  },

  renderRow: function() {
   _return (<View><Text>Testing</Text></View>)
  },

  render:_function() {
  _ return_(
_  __ <View_style = {{flex: 1, flexDirection: 'column'}}>
 _ _     _{Strings.work