NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
[TOC] ## 钙素 把值放入 ## 包含关系 ``` class Demo extends Component{ constructor(props) { super(props); } render() { return ( <div> <p>hello</p> {this.props.children} <p>hello</p> </div> ) } } class App extends Component{ constructor(props) { super(props); } render() { return( <div> <Demo> <h1>word</h1> </Demo> </div> ) } } ``` ## 槽 ``` class Demo extends Component{ constructor(props) { super(props); } render() { return ( <div> <p>hello</p> {this.props.left} <p>hello</p> {this.props.right} <p>hello</p> </div> ) } } class App extends Component{ constructor(props) { super(props); } render() { return( <div> 注意,使用了一个闭合标签 <Demo left={ <h1>leftleft</h1> } right={ <h1>rightright</h1> } /> </div> ) } } ```