I create a lot of react component dynamically on event handle.
The code is given blow:
var node = []; //this is update with properties on user action and an element is creaed
var node = Interfaces.Embroidery.node;
var components = node.map(function(props) {
return React.createElement('g', {
id: props.id,
key: props.id
},
React.createElement('path', props));
});
var App = React.createClass({
render: function() {
return React.createElement('div', null, components);
}
});
ReactDOM.render(React.createElement(App), document.getElementById('parentDrawingNode'));
now i want to remove a single element from the dom. i.e it will be a user action component or i want to remove in some special case and other component remain same.
By use refs of we are dealing with actual dom so the refs are not applicable in this case.