<div id="app"></div>
const app = document.querySelector('#app');
const root = ReactDOM.createRoot(app);

const element = React.createElement(
  'h1', // HTML 標籤
  {
    className: 'good-react' // HTML 屬性
  },
  'Hello React' // HTML 內容
)

root.render(element);
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://unpkg.com/react@18/umd/react.development.js
  2. https://unpkg.com/react-dom@18/umd/react-dom.development.js