Props
import React from 'react';
const person = (props)=>{
return(
<div>
<p>I Am a person!</p>
<p>{props.name}</p>
<p>i'm {props.age}</p>
<p>{props.children}</p>
</div>
)
};
export default person;
Children为< Person> < / Person>中的内容;
<Person name="manue" age="26">My Hobbies: Racing</Person>
转载请注明原文地址:https://ipadbbs.8miu.com/read-362.html