lib/react-goban.js
function toElem(shapes, callback) {
			var typeofShape;
			var txt = null;
			var k = 0;
			for (var i = 0; i < shapes.length; i++) {
						typeofShape = shapes[i].type;
						if (typeofShape == "text") {
									txt = shapes[i].txt;
									delete shapes[i].txt;
						}
						if (shapes[i].class) {
									shapes[i].className = shapes[i].class;
									delete shapes[i].class;
						}
						delete shapes[i].type;
						shapes[i].key = shapes[i].key || k++;
						if (callback) shapes[i].onClick = callback.bind(null, shapes[i].key); // Replace this by null for React
						shapes[i] = React.createElement(typeofShape, shapes[i], txt);
			}
			return shapes;
}
function toElem(shapes, callback) {
			var typeofShape;
			var txt = null;
			var k = 0;
			for (var i = 0; i < shapes.length; i++) {
						typeofShape = shapes[i].type;
						if (typeofShape == "text") {
									txt = shapes[i].txt;
									delete shapes[i].txt;
						}
						if (shapes[i].class) {
									shapes[i].className = shapes[i].class;
									delete shapes[i].class;
						}
						delete shapes[i].type;
						shapes[i].key = shapes[i].key || k++;
						if (callback) shapes[i].onClick = callback.bind(null, shapes[i].key); // Replace this by null for React
						shapes[i] = React.createElement(typeofShape, shapes[i], txt);
			}
			return shapes;
}
function toElem ( shapes , callback ) { var typeofShape ; var txt = null ; var k = 0 ; for ( var i = 0 ; i < shapes . length ; i ++ ) { typeofShape = shapes [ i ] . type ; if ( typeofShape == "text" ) { txt = shapes [ i ] . txt ; delete shapes [ i ] . txt ; } if ( shapes [ i ] . class ) { shapes [ i ] . className = shapes [ i ] . class ; delete shapes [ i ] . class ; } delete shapes [ i ] . type ; shapes [ i ] . key = shapes [ i ] . key || k ++ ; if ( callback ) shapes [ i ] . onClick = callback . bind ( null , shapes [ i ] . key ) ; // Replace this by null for React shapes [ i ] = React . createElement ( typeofShape , shapes [ i ] , txt ) ; } return shapes ; }
Converts shape list into React SVG elements.

@param {Array} shape list
@returns {Array} React element list
Converts shape list into React SVG elements .