Right now I have a sidebar that I want to use for various forms and bits of information. I'm using the global event system to trigger the opening of the sidebar, but I'm not sure how to inject react components into the sidebar react component.
I started by trying this
componentWillMount: ->
window.toggleSidebar = (react_component)=>
React.renderComponent(react_component(), document.getElementById('sidebar-content'))
@toggleSidebar()
But this didn't work once all of the components are mounted because you can't call render component into an element that is inside another component.
So is there an accepted way to pass any react component into another component?