我刚刚整合了两个新版本的
通过CDN,但是如果我使用reactjs 0.14.3的话,我就无法得到响应引导来工作。如果我降级到0.13.3版本,一切都很好。
有人知道发生了什么事吗?命名问题?
更新
实际上,它不是反应本身,而是DOM呈现!对于较早的版本,您必须使用JSXTransformer (0.13.3),而现在这个版本已被废弃,因此应该使用react-dom。
有解决办法吗?我怎样才能使用reactjs的最新版本和react引导?
发布于 2015-12-20 12:48:10
找到了解决办法。
实际上,这正是我引用源代码的方式。而不是
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/JSXTransformer.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.28.1/react-bootstrap.js"></script>
<script type="text/jsx">
// React Code
React.render(<Example/>, document.getElementById("example"));
</script>我使用
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react-dom.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.28.1/react-bootstrap.js"></script>
<script type="text/babel">
// React Code
ReactDOM.render(<Example/>, document.getElementById("example"));
</script>而且起作用了。
https://stackoverflow.com/questions/34379970
复制相似问题