Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does React have something like web component's <content/> ? It's really unfortunately that the LeftNav component takes an array of objects to turn into links instead of allowing you to define arbitrary html as <content/>


Yes, React components have a special `this.props.children` property [0]. Which works similarly to web components's <content/>.

The current implementation of `LeftNav` doesn't allow for this, but it would be easy to add.

0: http://facebook.github.io/react/docs/multiple-components.htm...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: