I have a code like this:
//my_file.js
var React = require('react');
var ReactDom = require('react-dom');
var App = React.createClass({
getInitialState:function(){
return {//something};
},
myFunction:function(html){
//some code
},
render:function(){
//some code
var someVar1, someVar2, someVar3;
someVar1.map( function(i, j){
someVar2.campos.map( function(k, j){
someVar3.campos.map( function(z, k){
this.myFunction(something);
}
}
}
return (
<div>
{ //something }
</div>
);
}
});
module.exports=App;
my_file.js:16 Uncaught TypeError: this.myFunction is not a function. What I'm doign wrong? How I use that function inside the render?