我要检查以下反应组件的返回JSX:
const App = () => {
const nums = [1,2,3,4,5]
return (
<div>
{courses.forEach(args => <Id id= {args}/>)}
</div>
)
}
const Id = ({id}) => {
return (
<div>
{id}
</div>
)
}
现在,如果运行以下行:
const x = <App />
x的值是否为-<div> 1 </div> <div> 2 </div> <div> 3 </div>
...?
如何检查x的值? Console.log(x)打印出奇怪的内容