2

Hi i am very new to Reactjs. instead of setting up webpack and babel, i am executing examples with React cdn references.i also want to use react-datepicker component,when i included this through cdn it throughs some error,guys help me out how to get rid of this and make it work

<!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>

and the error i am getting in the console is enter image description here

yasarui
  • 6,209
  • 8
  • 41
  • 75
  • hi @codegeek did you find a solution , facing the same issue since i'm using require.js in react I need a cdn to load it – Jayavel Apr 10 '18 at 06:41
  • Hi, I have the same problem. Please someone answer this question. In my situation I can use React only from CDN and I need datepicker from CDN too. Basically we need an example on how to use it through CDN. – Vlado Apr 20 '18 at 06:49

0 Answers0