js

Can someone tell me why this doesn't work locally using cdn links

<h1>Hello React!</h1>, document.getElementById('root'))
 
 
<script crossorigin src="[url=https://unpkg.com/react@16/umd/react.production.min.js"></script>]https://unpkg.com/react%4016/u ... gt%3B[/url]
<script crossorigin src="[url=https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>]https://unpkg.com/react-dom%40 ... gt%3B[/url]
Error: Uncaught SyntaxError: Unexpected token <
You already invited:

Felix

Upvotes from:

You need babel if you want to use jsx 
 
<script src="[url=https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.26.0/babel.min.js"></script>]https://cdnjs.cloudflare.com/a ... gt%3B[/url]

If you wanna answer this question please Login or Register