由于缺少对Commonjs模块的支持,从react_rails gem获得令人沮丧的感觉,我正在从netguru测试
react_webpack_rails gem.但从那以后,我得到了一个不变的违规.
例如,如果我在ES6语法中编写一个简单的Hello World组件:
提出这些错误:
- Warning: React.createElement: type should not be null,undefined,boolean,or number. It should be a string (for DOM elements) or a ReactClass (for composite components).
- Uncaught Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
您的帮助将非常感谢,我无法确定错误来自哪里.