I know this method:
React.render(<Account/>, document.getElementById('app'));
React.unmountComponentAtNode(document.getElementById('app'));
But what if my component has been rendered like that ?
<body>
<div id="container">
<MyComponent/>
</div>
</body>
Rendering function of MyComponent:
render: function() {
<div id=search>
<input etc........./>
</div>
}
I tried
React.unmountComponentAtNode(document.getElementById('search'));
and
React.unmountComponentAtNode(document.getElementById('container'));
but it's not working.
What should I do ?