Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript React Basics First Steps in React Add React to a Project

The CDN links for react are not working.

I followed along by going into react an pasting in the CDN link but it highlights red as an error whenI paste them in the index.html file

<!DOCTYPE html>
    <meta charset="utf-8">
    <link rel="stylesheet" href="./app.css" />

    <div id="root"></div>

    <script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
    <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
    <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
    <script type="text/babel" src="./app.js"></script>


Mod edit: corrected the markdown formatting. Remember to reference the Markdown Cheatsheet and preview your post before submitting.

Roman Kovalchyk
Roman Kovalchyk
Courses Plus Student 301 Points

By the way, I have similar problem. When I am trying to run code from tutorial it is not working

1 Answer

Alex Koumparos
Alex Koumparos
Python Development Techdegree Student 36,862 Points

Hi Adam,

I copy-pasted your code (or at least what I think was your code after I fixed the markdown formatting) and it worked on my system.

Can you describe exactly what actual errors you got with your code? The only red I'm seeing is red underlining on "crossorigin" from the spell checker and then in Chrome dev tools the only red I'm seeing is a warning about the <input> tag (but this is in the app.js file, not index.html). Neither of these is a problem with the CDN links.