使用 JSX 渲染 <p> 元素。
const paragraph = @(3)This is a paragraph using JSX!@(4);
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(paragraph);
const paragraph = <p>This is a paragraph using JSX!</p>;
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(paragraph);
const paragraph = <P>This is a paragraph using JSX!</P>;
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(paragraph);