I\'m trying to unmount a React.js node with this._rootNodeID
handleClick: function() { React.unmountComponentAtNode(this.
First , i am new to reactjs ,too . Of course we can control the Component all by switch the state , but as I try and test , i get that , the React.unmountComponentAtNode(parentNode)
can only unmount the component which is rendered by React.render(
. So
to be removed must be appened by React.render()
method , so I write the code
Run the sample code in jsFiddle , and have a try .
Note: in the sample code
React.findDOMNode
is replaced bygetDOMNode
as the reactjs version problem .