React.js: Example in tutorial not working

后端 未结 7 1076
陌清茗
陌清茗 2020-12-29 01:45

I\'m doing the React.js tutorial from http://facebook.github.io/react/docs/tutorial.html. Here are my files:

template.html:


    

        
7条回答
  •  失恋的感觉
    2020-12-29 02:09

    JSXTransformer tries to load the source using ajax. This will not work for file:// paths.

    This means that you should either serve your small project using a HTTP server (apache, grunt connect etc.) OR put your script source directly in the script tag.

提交回复
热议问题