React.js: Example in tutorial not working

Chrome doesn’t let you load file:// urls via XHR (which as mentioned elsewhere is how the in browser transform works). You have a couple options:

  • Use a different browser. I know Firefox works.
  • Start a local web server (Python ships with one, so if you have that installed it’s very simple – http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python).
  • Put the script inline instead of in a separate file. That’s doable for something simple like this but you’ll want to try one of the other options as your code gets more complicated.

Leave a Comment