运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html lang="en"> <title>myPage</title> <script src= "https://unpkg.com/react@16/umd/react.production.min.js"></script> <script src= "https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script> <script src= "https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script> <body> <div id="root"></div> <script type="text/babel"> function Welcome(props) { return <h1>Hello {props.name}!</h1>; } ReactDOM.render(<Welcome name = "John Doe"/>, document.getElementById('root')); </script> </body> </html>