【问题标题】:React not importing App.js file correctly反应未正确导入 App.js 文件
【发布时间】:2022-09-23 16:55:20
【问题描述】:

为什么我的反应代码不会从 App.js 导入。

每当我加载我的本地主机时,它都会保持空白。

enter image description here

  • 你如何运行你的应用程序?你能分享一个你遇到问题的项目吗?

标签: node.js reactjs intellij-idea


【解决方案1】:

在根(第 9 行)中,您需要渲染 App 组件以查看其内容...

root.render(
    <App />
 );

【讨论】:

    猜你喜欢
    • 2021-09-16
    • 2021-04-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-09
    • 2020-08-14
    • 1970-01-01
    相关资源
    最近更新 更多