0

I am newcomer with React and could not handle this error. I have two components the first one (routing):

var App = React.createClass({
  render: function() {
   return (
    <Template>
      <Locations>
        <Location path="/" handler={Catalog} />
        <Location path="/item/:item" handler={CatalogDetail} />
      </Locations>
    </Template>
   );
  }
});

and second one:

var Template = React.createClass({
  render: function() {
    return (
      <div className="container">
        {this.props.children} // should render one of child components
                              //{catalog}/{catalogDetail}
      </div>
    )
  }
});

this.props.children is undefined and I could not understand why is not seeing one of these components {Catalog} or {CatalogDetail}

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Vladyslav Babenko
  • 1,349
  • 18
  • 26

0 Answers0