零:属性 props
属性:是不能被修改的,是由父组件传入的。
一:写法1:<hello name= ? >
"name1"
{123}
{"name1"}
{1,2,3}
{variable}
写法2:var props={
one:"123",
two:321
}
<hello {...props}/> 直接添加one two属性
<hello {props}/> 得到props对象
写法3:var instance=React .render(<hello></hello>,document.body);
instance.setProps("name","Tim");
原文:http://www.cnblogs.com/yuexiuyi/p/7355664.html