JavaScript React Basics First Steps in React Embed JavaScript Expressions in JSX

jang walia
jang walia
7,717 Points


i have written the jsx code as shown in the video but i got an error saying access to hml request to 'file:///C:/xampp/htdocs/App.js' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. please help

1 Answer

Elias Flores
Elias Flores
905 Points

Try to run:

python -m SimpleHTTPServer 8000

Then open a new tag on your browser and go to localhost:8000

This works! Although i thought we were able to use React locally without a server, but guess i'm wrong.