Open TimNZ opened 6 years ago
@TimNZ solved it? I get the same thing.... thought about ReactDom.createPortal
groupTemplate: function(group,element){
if (!group) return
ReactDOM.unmountComponentAtNode(element)
ReactDOM.render(<GroupTemplate label={group.content}/>,element)
return ' ' <-----
},
Thanks!
ReactDOM.render() returns null for pure components, so the React example and docs should return '' from the template functions instead of the return value of ReactDOM.render(), for people who will get caught out.
Returning null in a template results in the item id being inserted in addition to React content being rendered.
Alternatively, don't insert the id if null is returned from the template func.