",
children: "hello,itclanCoder"
}
}
这些对象被称为 “React 元素”。...XML(HTML) 只能有且仅有一个顶层元素 ,当然也可以借助React提供的Fragment(也叫占位符)这个内置组件将你写的JSX子元素给包裹起来,可以包含子节点 ,也支持插值表达式 {表达式}
为了便于阅读...JSX的具体使用
在JSX中嵌入表达式{ 表达式 }
双大括号内可以是变量,字符串,数组,函数调用, 但是不可以是对象,也不支持 if,for语句
例如:你在插值表达式里写对象:它是会报错的
{ {name...If you meant to render a collection of children, use an array instead
该错误的意思是:对象无效作为React子对象(找到:具有键{name...: 'div',
attribute: { className: 'input-wrap'},
children: [
{
tagName: 'input',
attribute