Show/Hide components in ReactJS
We have been experiencing some problems in using react now but it kinda boils to one part of how we have been using react. How should we have been showing/hiding child components? This is how we have coded it (this are only snippets of our components)... _click: function() { if ($('#add-here').is(':empty')) React.render(<Child />, $('#add-here')[0]); else React.unmountComponentAtNode($('#add-here')[0]); }, render: function() { return( <div> <div onClick={this._click}>Parent - click me to add child</div> <div id="add-here"></div> </div> ) } and lately I've been reading examples like it should