Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/03/2016, 04:17
fernandooj
 
Fecha de Ingreso: junio-2012
Ubicación: bogota
Mensajes: 44
Antigüedad: 12 años, 10 meses
Puntos: 2
error: Uncaught Invariant Violation: reactjs, cargar array

hola a todos:
de antemano estare muy agradecido quien me pueda ayudar con esta linea
tengo esto
Código Javascript:
Ver original
  1. var Modulo5_ = React.createClass({
  2. render: function() {
  3.   return(
  4.        <img src={this.props.ruta} className="img-responsive" />
  5.        <p>{this.props.title}</p>
  6. )
  7. })
  8.  
  9. var Modulo5 = React.createClass({
  10.     getInitialState: function(){
  11.         return { tituloRopa:[
  12.                 {titulo:'ropa uno', ruta:'img/img1.jpg'},
  13.             {titulo:'ropa dos', ruta:'img/img2.jpg'},
  14.             {titulo:'ropa tres', ruta:'img/img3.jpg'},
  15.             ]}
  16.         },
  17.     render: function(){
  18.         return(
  19.             <header>
  20.                <div>
  21.                  {
  22.                    this.state.tituloRopa.map(function(titleRop, rutaRop,  i){
  23.                     return(
  24.                       <Modulo5_ key={i} title={tituloRop} ruta={rutaRop}>
  25.                                       </Modulo5_>  
  26.                     )
  27.                    })
  28.                  }
  29.                    </div>
  30.              </header>
  31.             )
  32.         }
  33.  
  34.     })
y tengo este error:
and i have this error: Uncaught Invariant Violation: Objects are not valid as a React child (found: object with keys {titulo, ruta}). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of Modulo5_