No example of reaction code



  • It's all right, but it's not on the screen. What's the problem? http://codepen.io/412/pen/GqBBLN

        // App
    var App = React.createClass({
      render: function() {
        return (
          <div>
         <Nav />
         <Header />
       </div>
        )
      }
    });
    

    // Nav
    var Nav = React.createClass({
    render: function() {
    return (
    <ul className="nav nav-pills">
    <li role="presentation" className="active"><a href="#">вкладка</a></li>
    <li role="presentation"><a href="#">вкладка</a></li>
    <li role="presentation"><a href="#">вкладка</a></li>
    </ul>
    )
    }
    });

    // Header
    var Header = React.createClass({
    render: function() {
    return (
    <h1 className="foo">привет</h1>
    )
    }
    });

    React.render(<App/>, document.querySelector("#mm"));



  • You. React.render Right.

    ReactDOM.render(<App/>, document.querySelector("#mm"));
    

    Then it works. http://codepen.io/anon/pen/xOJaxK

    Explanation https://stackoverflow.com/questions/26627665/error-with-basic-react-example-uncaught-typeerror-undefined-is-not-a-function




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2