Accepted answer

You need to pass it in the binding:

var Board = React.createClass({
//dungeon map available in this.props.board  

render: function() {

    return (

    <table className="table">
        //loop through every element of the board array
        //these are the rows

        var row = index;

            return (


                /** NOTICE rowIndex **/  
      , item,index){

                    var position = [row, index]
                    //this does not work for row
                //row from outer map loop not accessible

                    return (

                    <Cell value={item} position ={rowIndex}/>


                /** NOTICE we pass the row's index to binding **/
                }.bind(this, index))









NOTE: The order matters. notice rowIndex is first.

Related Query

More Query from same tag