ReactJS: "Uncaught SyntaxError: Unexpected token <"
Add type="text/babel"
to the script that includes the .jsx file and add this: <script src="https://npmcdn.com/[email protected]/browser.min.js"></script>
Add type="text/babel"
as an attribute of the script tag, like this:
<script type="text/babel" src="./lander.js"></script>
JSTransform is deprecated , please use babel instead.
<script type="text/babel" src="./lander.js"></script>
UPDATE -- use this instead:
<script type="text/babel" src="./lander.js"></script>
Add type="text/jsx"
as an attribute of the script
tag used to include the JavaScript file that must be transformed by JSX Transformer, like that:
<script type="text/jsx" src="./lander.js"></script>
Then you can use MAMP or some other service to host the page on localhost so that all of the inclusions work, as discussed here.
Thanks for all the help everyone!