I run into an issue in the rendering. I did some search online, but I didn't find a solution.
In the parent component:
<Child prop1={this.getHeader()}>
getHeader() : function () {
return (<div> Header </div>)
}
In the Child component:
render() : function () {
return (<div> {this.props.prop1} </div>)
}
However, the div didn't get rendered. I checked other solution and tried dangerouslySetInnerHTML, but it will render the string of " Header " rather than the element. Could i get some help?