React 入门
React ES6 箭头函数
React ES6 变量
React ES6 数组方法
React ES6 解构
React ES6 扩展
React ES6 三元运算符
React JSX
React 组件
React 属性
React 事件
React 条件
React 列表
React 钩子 useState
React 钩子 useEffect
React CSS 样式

Menu
×
×
正确

练习:

渲染一个 <p> 元素,不使用 JSX。

const paragraph = React.createElement('p', {}, 'This is a paragraph without using JSX!'); const root = ReactDOM.createRoot(document.getElementById('root')); root.render(paragraph);
const paragraph = React.createElement('P', {}, 'This is a paragraph without using JSX!'); const root = ReactDOM.createRoot(document.getElementById('root')); root.render(paragraph);
const paragraph = React.createElement("p", {}, 'This is a paragraph without using JSX!'); const root = ReactDOM.createRoot(document.getElementById('root')); root.render(paragraph);
const paragraph = React.createElement("P", {}, 'This is a paragraph without using JSX!'); const root = ReactDOM.createRoot(document.getElementById('root')); root.render(paragraph);

不正确

点击 此处 重试

正确

下一题 ❯
const paragraph = React.createElement(, {}, 'This is a paragraph without using JSX!');

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(paragraph);







×

重置分数?