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 Introducing Props Use Keys to Keep Track of Elements

can't connect to react

1)Access to script at 'https://unpkg.com/react-dom@16.7.0/umd/react-dom.development.js' (redirected from 'https://unpkg.com/react-dom@16/umd/react-dom.development.js') from origin 'http://localhost' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. 2)GET https://unpkg.com/react-dom@16.7.0/umd/react-dom.development.js net::ERR_FAILED 3)app.js:75 Uncaught ReferenceError: ReactDOM is not defined at <anonymous>:92:1 at i (babel.min.js:24) at r (babel.min.js:24) at e.src.n.(anonymous function).l.content (https://unpkg.com/babel-standalone@6.26.0/babel.min.js:24:30503) at XMLHttpRequest.n.onreadystatechange (babel.min.js:24) (anonymous) @ app.js:75 i @ babel.min.js:24 r @ babel.min.js:24 e.src.n.(anonymous function).l.content @ babel.min.js:24 n.onreadystatechange @ babel.min.js:24 XMLHttpRequest.send (async) s @ babel.min.js:24 (anonymous) @ babel.min.js:24 o @ babel.min.js:24 u @ babel.min.js:24 f @ babel.min.js:1 (anonymous) @ babel.min.js:1


when I open with wamp , these appears in console what is wrong with that

2 Answers

You are running into a Cross-Origin Resource Sharing issue. CORS. Here is an article that may shed some light on what is going on with your CORS. https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

thank you so much . I got it