function Com(props){ return ( <div>无状态组件props ---{props.name} </div> ) } Com.defaultProps={ name="默认内容" } ReactDom.render(<Com /> document.getElementById("theID"));