我正在尝试为我的项目构建用于回流模型的项目,如您所知,回流有:
myblog
-actions
-stores
-conponents
-----register.js
-libs
-----react.js //or react.js add on, tried using
-----JSXTransformer.js
-----react-with-addons.js //or remove it, tried using
-----reflux.js
-test.html
- 在 components/register.js 中,我创建了一个带有代码的 global.RegisterForm:
(function(React, global) {
global.RegisterForm = React.createClass({
render : function() { return<h2>Register Form</h2>
} }) })(window.React, window);
- 测试.html:
<html> <head> <script src="libs/react.js"></script> <script src="libs/JSXTransformer.js"></script> <script src="libs/reflux.js"></script> <script src="pages/register.js"></script> <script type="text/jsx"> (function(React, global) { var RegisterPage = global.RegisterPage; var App = React.createClass({ render : function() { return (<RegisterPage />); } }) React.render(<App />, document.body) })(window.React, window); </script> </head> <body> </body> </html>
- 错误: 在此处输入链接描述
你认为没有路由器回流的这个错误是因为我参考了有路由器的回流todo样本吗?
谢谢