点击查看html编辑器说明文档

react 演示edit icon

|
|
Fork(复制)
|
|
作者:
用户fkxIv10
提交反馈
嵌入
设置
下载
预览
控制台
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ...
展开
</head>
<body>
            
            <script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react-dom.js"></script>
<script src="https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/babel-standalone/6.26.0/babel.min.js"></script>
<div id="root"></div>
<script type="text/babel">
    function formatName(user) {
      return user.firstName + ' ' + user.lastName;
    }

    const user = {
      firstName: 'Foo',
      lastName: 'Bar'
    };

    const element = (
      <h1>
        Hello, {formatName(user)}!
      </h1>
   );
  
</script>

<script type="text/babel">
  
    ReactDOM.render(
      element,
      document.getElementById('root')
    );
</script>
        
</body>
CSS
格式化
            
            body {
  background: #666;
}
        
JS
格式化