Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 React jsx 文件在浏览器内转换中运行良好。 但是在我安装 npm 并安装 react-tools 并使用 转换命令行后jsx -watch source/ build/,新转换的 JavaScript 文件看起来很好,但只会呈现不完整的 DOM 树。
jsx -watch source/ build/
我该如何解决?
这是根据信息在黑暗中拍摄的,我相信你继续前进,但是......
在我的情况下,我是个傻瓜,type="text/jsx"即使我包含了编译的 js 文件,而不是 jsx,也留在了脚本标签中。我只需要从脚本标签中删除类型就可以了。
type="text/jsx"