Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 为什么浏览到localhost:3000时会出现空白页?_Reactjs - Fatal编程技术网

Reactjs 为什么浏览到localhost:3000时会出现空白页?

Reactjs 为什么浏览到localhost:3000时会出现空白页?,reactjs,Reactjs,在端口3000启动服务器后,尝试此示例会得到一个空白页。代码如下: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/6.1.19/browser.min.js"></

在端口3000启动服务器后,尝试此示例会得到一个空白页。代码如下:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/6.1.19/browser.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react-dom.js"></script>
  </head>
  <body>
      <div id="app"></div>

      <script type="text/babel">
        ReactDOM.render(

          <h1>Hello React</h1>,
          document.getElementById('app')
        );

      </script>
  </body>
</html>

ReactDOM.render(
你好,反应,
document.getElementById('app')
);
那为什么我会得到空白页呢

我看到控制台中有一个错误,但我不知道这是否是问题所在。我在Windows10上


巴贝尔的最新版本似乎有问题,我切换到5.8.23,正常情况下我会收到“Hello Ract”