Reactjs 学习React路由时获取错误元素类型无效

Reactjs 学习React路由时获取错误元素类型无效,reactjs,react-router,Reactjs,React Router,我是新来的。我正在学习反应路线。我创建了一个简单的应用程序。这是我的密码 <html> <head> <title>React Routing</title> <script src="/Ch13-01-DisplayInitialFrame/resources/js/react.js" type="text/javascript"></script> <scri

我是新来的。我正在学习反应路线。我创建了一个简单的应用程序。这是我的密码

<html>
    <head>
        <title>React Routing</title>
        <script src="/Ch13-01-DisplayInitialFrame/resources/js/react.js" type="text/javascript"></script>
        <script src="/Ch13-01-DisplayInitialFrame/resources/js/react-dom.js" type="text/javascript"></script>

        <script src="/Ch13-01-DisplayInitialFrame/resources/js/babel.js" type="text/javascript"></script>

        <script src="/Ch13-01-DisplayInitialFrame/resources/js/react-router-4.0.0-2.js" type="text/javascript"></script>
        <link href="/Ch13-01-DisplayInitialFrame/resources/css/reactRouting.css" rel="stylesheet"><script>;
    </head>
    <body>
        <div id="container"></div>
        <script src="/Ch13-01-DisplayInitialFrame/resources/js/reactRouting.js" type="text/babel"></script>
    </body>
</html>
我做错了什么?我正在使用
React v15.3.1
。我需要更多的js来运行这个代码吗


谢谢

您正在使用的ReactRouter 4的api与以前的版本完全不同,请使用。
我还建议您在开始使用React时特别使用bundler。是一个很好的样板生成器,例如,它负责bundler配置、babel等。
最后,在ReactRouter v4中,您应该使用基于文档的
ReactRouter.BrowserRouter
组件。
如果您坚持尝试使用脚本标签react,请使用npm页面中提供的脚本链接添加ReactRouter。我强烈建议不要在生产应用程序中使用此配置

var destination = document.querySelector("#container");
var App = React.createClass({
    render: function() {
        return (
            <div>
                <h1>Simple SPA</h1>
                <ul className="header">
                    <li>Home</li>
                    <li>Stuff</li>
                    <li>Contact</li>
                </ul>
                <div className="content">
                </div>
            </div>
        );
    }
});

ReactDOM.render(
    <div>
        <App/>
    </div>,
    destination
);
ReactDOM.render(
    <ReactRouter.Router>
        <ReactRouter.Route path="/" component={App} />
    </ReactRouter.Router>,
    destination
);
You are using the in-browser Babel transformer. Be sure to precompile your     scripts for production - https://babeljs.io/docs/setup/
babel.js (60774,4)
Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).
react.js (20483,9)
Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components).
react.js (20483,9)
SCRIPT5022: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
react.js (20157,5)