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

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -