javascript - Uncaught TypeError: Cannot read property 'map' of undefined in React.js after update from 0.11 to 0.13 -


after update react.js 0.11 0.13 there appear error in getoptiontorender.

i read changelog havent found usefull. whats problem here?

here code:

'use strict'; var react = require('react'); var option = require('./option'); module.exports = react.createclass({   displayname: 'categoryselecter',   shouldcomponentupdate: function () {     return false;   },   getoptionstorender: function () {     return this.props.categories.map(function (category) {       return (         react.createelement(option, {key: category.display, input: category})       );     });   },   handlechange: function (event) {     this.props.changecategory(event.target.value);   },   render: function () {     return (       react.createelement("div", {classname: "container top15"},         react.createelement("form", null,           react.createelement("div", {classname: "form-group"},             react.createelement("select", {onchange: this.handlechange, classname: "form-control"},               this.getoptionstorender()             )           )         )       )     );   } }); 


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -