通过CDN包含react-datepicker通过未捕获的错误

时间:2017-06-09 03:05:15

标签: reactjs react-dom react-datepicker

嗨,我对Reactjs很新。而不是设置webpack和babel,我正在使用React cdn references.i执行示例也想使用react-datepicker组件,当我通过cdn包含它通过一些错误,伙计们帮助我如何摆脱这个并使它的工作

<!DOCTYPE html>
<html>
<head>
     <title> React Basic Example </title>
</head>
<body>
  
  <div id="root"></div>
 


  <!-- React Libraries -->
  <script src="https://unpkg.com/react@15/dist/react.min.js"></script>
  <script src="https://unpkg.com/react-dom@15/dist/react-dom.min.js"></script>
  <!-- Babel -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.25.0/babel.min.js"></script>
  <!-- moment.js -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
  <!-- React date picker -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/react-datepicker/0.47.0/react-datepicker.min.js"></script>
  <script type="text/babel">
     var App = React.createClass({
         render:function(){
            return (
               <h1> Hello this is an APP </h1>
            );
         }
     });
     ReactDOM.render(<App />,document.getElementById('root'));
  </script>
</body>
</html>

我在控制台中遇到的错误是 enter image description here

0 个答案:

没有答案