9
ReactJS:“ Uncaught SyntaxError: โทเค็นที่ไม่คาดคิด <”
ฉันกำลังพยายามเริ่มสร้างไซต์ใน ReactJS อย่างไรก็ตามเมื่อฉันพยายามใส่ JS ของฉันในไฟล์แยกต่างหากฉันเริ่มได้รับข้อผิดพลาดนี้: "Uncaught SyntaxError: Uncaught SyntaxError: Uncaught token <" ฉันพยายามเพิ่ม/** @jsx React.DOM */ที่ด้านบนของไฟล์ JS แต่ก็ไม่ได้แก้ไขอะไร ด้านล่างนี้คือไฟล์ HTML และ JS มีความคิดว่าเกิดอะไรขึ้น? HTML <html> <head> <title>Page</title> <script src="http://fb.me/react-0.12.2.js"></script> <script src="http://fb.me/JSXTransformer-0.12.2.js"></script> <script src="http://code.jquery.com/jquery-1.10.0.min.js"> </script> <script src="./lander.js"> </script> </head> <body> <div id="content"></div> <script type="text/jsx"> React.render( <Lander />, document.getElementById('content') ); </script> </body> …