未捕获的ReferenceError:来自cnd include的控制台中没有定义react

时间:2017-12-10 20:55:51

标签: reactjs

看到我是react.js中的新手并且包括反应和反应dom ......但是在这里,我包括cdn但错误将随控制台一起提供。请帮助我。

<html>
     <head>
         <script src="https://unpkg.com/react@0.14.7/dist/react.js">
     </script>
         <script src="https://unpkg.com/react-dom@0.14.7/dist/react-
    dom.js">
         </script>
         <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-
         core/5.8.23/browser.min.js"></script>

        </head>
          <body>
            <div id="app"></div>
              <script type="text/babel">
               let HocCompont= (BasicComponent) => class extends 
                   react.Component {
                       render(){
                          return(
                             <div className="abc"> <BasicComponent/> </div>
                            )
                            }
                          }
                   const StatelessCoponent = () =>{
                        return(  <button>I am button</button>
                        )
                          }
            let ExtendedButton = HocCompont(StatelessCoponent);

         ReactDOM.render(<ExtendedButton/>,document.getElementById("app"));
      </script>
    </body>
    </html>

0 个答案:

没有答案