reactjs - rowHasChanged Undefined is not a constructor -
hello i'm creating grid , have constructor in class
export class grid extends component { constructor (props) { super(props) var ds = new listview.datasource({rowhaschanged: (r1, r2) => r1 !== r2}) this.state = {datasource: ds.clonewithrows(this._genrows({}))} } . . . }
i'm getting following error when try run this:
undefined not constructor (evaluating 'new) _reactnative.listview.datasource({rowhaschanged:function rowhaschanged(r1,r2){returnr1!==r2;}})')
can give me hand on this? thank in advance!
i think typo. try using datasource
instead of datasource
in line:
var ds = new listview.datasource( ...
listview
reference: http://facebook.github.io/react-native/releases/0.29/docs/listview.html
Comments
Post a Comment