If you need to add a class to the component: React.findDOMNode(this).classList.add("classname");
To remove: React.findDOMNode(this).classList.remove("classname");
If you are trying to add a class to componentWillUpdate and delete it in componentDidUpdate , you need to use something like setTimeout to notice the change. For instance:
componentWillUpdate: function() { React.findDOMNode(this).classList.add("class1", "class2"); }, componentDidUpdate: function() { var el = React.findDOMNode(this); setTimeout(function(){ el.classList.remove("class1"); }, 1000); }
source share